|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Re: a nicer total sibling count than this
--- scruss at sympatico dot ca wrote: > Jeni Tennison wrote: > > > > <xsl:if test="../def[2]"> > > ... > > </xsl:if> > > How elegant! Thank you. > > Think I'll be off to Chapters.ca now to buy your book > (and DaveP's too, since I'll have to print this thing eventually.) > > Stewart While this is indeed ellegant, the reason Jeni put first the other solution: preceding-sibling::def or following-sibling::def I think, is because three nodes must be visited in order to evaluate ../def[2], while the "or" expression above can be evaluated visiting two nodes (worse case) or even only a single node (best case). This means that the "or" expression above can be evaluated from 1.5 to three times faster. Of course, the absolute time difference will be very small, but if such expressions are evaluated many times there could be some greater time savings. ===== Cheers, Dimitre Novatchev. http://fxsl.sourceforge.net/ -- the home of FXSL __________________________________________________ Do you Yahoo!? New DSL Internet Access from SBC & Yahoo! http://sbc.yahoo.com XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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








