Closed robander closed 7 years ago
Originally index related codes were written in XSLT 1.0 when DITA-OT uses Saxon 6.5.5 as XSLT processor. These code should be refined by XSLT 2.0 grouping facility. But I have no band-width to do it now.
Understood. I've still got a lot of code hanging around that was clearly written for XSLT 1.0, and parts of it will probably stay that way forever :-)
I've been playing with the index collation routines, and trying to use some of the metadata on
<index-data>
for debug purposes.Currently, it preserves
@xtrf
from the original index term, which gives you the source file name. It doesn't save@xtrc
, which provides the location of that element within the file. My index test cases have a couple hundred entries in a single topic, so having the ability to trace the full debug information (file + element location) is helpful. It's also helpful when trying to modify the PDF5 index sort for use elsewhere, because it gives me a precise way to connect the<index-data>
with the original term.I thought this might be of interest for the main PDF5 code. I know the mode MODE_INDEX_DEBUG strips out
@xtrf
so in this pull request I had it strip out@xtrc
as well. ThegetXtrc
function is added to match the existinggetXtrf
but I'm not sure it's necessary, asgetXtrf
is only referenced from commented code.