Subject: Re: [xsl] Will Saxon 9 optimize or cache this so performance doesn't degrade? From: Michael Kay <mike@xxxxxxxxxxxx> Date: Tue, 05 Feb 2013 09:31:17 +0000 |
<xsl:variable name="topicChapters" select="$map//*[contains(@class, ' bookmap/chapter ')] union $map//*[contains(@class, ' bookmap/appendix ')] union $map//*[contains(@class, ' bookmap/preface ')]"/>
Michael Kay Saxonica
Hi, all...
I've got a PDF customization template that gets called maybe a couple of dozen times during the processing of a DITA bookmap. It has the following code in it:
<xsl:variable name="topicChapters"> <xsl:copy-of select="$map//*[contains(@class, ' bookmap/chapter ')] union $map//*[contains(@class, ' bookmap/appendix ')] union $map//*[contains(@class, ' bookmap/preface ')]"/> </xsl:variable>
This code will have to scan a good deal of the XML tree document represents the book. The document will not change between each execution of the template.
Will Saxon optimize/cache this and not calculate it each time? I can always set this variable in a parent template (that executes only once) and pass it into this one. For readability however, it makes more sense to have this variable where it is.
Thanks
Steve
Steve Fogel | Information Architect, Oracle Database | 650.506.4914 Oracle Server Technologies Information Development 500 Oracle Parkway | M/S 4op1126 | Redwood Shores, CA 94065
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Will Saxon 9 optimize or cach, Steve Fogel | Thread | [xsl] [Announce] April 2013 Classes, G. Ken Holman |
[xsl] Will Saxon 9 optimize or cach, Steve Fogel | Date | Re: [xsl] RE: Saxon via Ant - Getti, Jirka Kosek |
Month |