Worked on the XML-to-HTML conversion scripts some more on
the train
this morning. Cross-references are working pretty well
now, but thanks
to (yet another) XLST limitation, processing the stylesheet
is much
slower than it ought to be. If I could only do
< xsl:key select="document('INDEX.XML')//DEFINITION"
use="@name"/>
(where
INDEX.XML is generated on a separate
preprocessing pass)
then I could use the
key() function to look up
cross-references.
Since this isn't allowed, it's necessary to do a linear scan
through the
entire index document for each hyperlink.
XSLT is a really nice language for the most part, but I
keep running
into (apparently arbitrary) limitations like this. I'd
really like
to be able to define functions from node-sets to node-sets.
xsl:template
can emulate node set functions, but can only return strings
or result-tree-fragments.
Compositionality is lacking...