|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: testing attributes
> <xsl:when test="count(//course) > 0"> > > Tha's a very expensive test it causes the whole document to > be searched > to arbitray depth to count all the course elements and then > you throw it > all away as you don't really need them. If you are lucky your > system (I > think saxon does this) will spot this idiom and change it to > <xsl:when test="//course"> > and stop the search when it finds the first course. That optimization competes in this case with another optimization, which is that if your stylesheet uses the expression //course then Saxon assumes you're likely to use it more than once and saves the result just in case. I'm not sure which one will win in this case without trying it out. Michael Kay http://www.saxonica.com/
|
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
|

Cart








