On Fri, Jan 8, 2010 at 11:54, Richard Quadling <[email protected]> wrote: > 2010/1/8 Hannes Magnusson <[email protected]>: >> On Fri, Jan 8, 2010 at 10:55, Richard Quadling <[email protected]> >> wrote: >>> Hi. >>> >>> Something that I would like to update in PhD is when an error is >>> reported (say VERBOSE_MISSING_ATTRIBUTES), to be able to include the >>> xml:ID of the nearest ancestor with an xml:ID. >>> >>> So, ... >>> >>> [VERBOSE_MISSING_ATTRIBUTES] Missing alt attribute for >>> en/features/figures/gc-algorithm.png >>> >>> becomes >>> >>> VERBOSE_MISSING_ATTRIBUTES] Missing alt attribute for >>> en/features/figures/gc-algorithm.png for features.gc.collecting-cycles >>> >>> Is there an easy way to do this that doesn't cost require massive >>> amount of searching? >> >> You can get the current chunk ID with little effort I think. >> IIRC that will even work when building bightml, as chunks are still >> registered, just not rendered as such. > > Any idea how?
$<format>->CURRENT_CHUNK >> Speaking of errormessages, "VERBOSE_MISSING_ATTRIBUTES" doesn't really >> have a great meaning. >> We should map the constants to textual representation, so that error >> message above becomes "Missing attributes: Missing alt attribute >> for".. > > Those descriptions are in the errh() function in phpdotnet\phd\functions.php > > Is changing ... > > // PhD warnings > VERBOSE_NOVERSION => 'VERBOSE_NOVERSION', > VERBOSE_BROKEN_LINKS => 'VERBOSE_BROKEN_LINKS', > VERBOSE_MISSING_ATTRIBUTES => 'VERBOSE_MISSING_ATTRIBUTES', > > to ... > > // PhD warnings > VERBOSE_NOVERSION => 'No version information', > VERBOSE_BROKEN_LINKS => 'Broken links', > VERBOSE_MISSING_ATTRIBUTES => 'Missing attributes', > > enough for you? That would be what I was thinking, yeah. -Hannes
