Re: XSL performance question: running count of attribu
Michael Ludwig schrieb am 09.04.2009 um 21:48:58 (+0200): > <xsl:template match="syl"> > <xsl:copy> > <xsl:attribute name="running"> > <xsl:value-of select=" > $sums/LEN[@id = generate-id(current())]/@sum"/> The above line would be better written as: $sums/LEN[@id = generate-id(current())]/@sum"/> So the processor knows it can stop searching on encountering the first match, of which there can be only one. (As long as the number of <syl> elements is small, it shouldn't matter too much.) Even better would be a key on the variable, or a key that would yield the positional index to use on the variable, but I don't know how this would be possible. Michael Ludwig
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format