|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Testing by counting or positional predicate
Hi Mike, Thanks very much for your discussion. I'll go back to the counting method. On the same kind of topic, there's the question of which of these is more efficient: count($node-set) >= $length or: $node-set[$length] I guess that this will depend on when the node set is constructed: if it's constructed in advance of the test, then the first is probably better because it just tests two numbers as opposed to iterating over the nodes, unless $length is very small in which case they're probably roughly equivalent. If the node set is constructed on the fly and it's relatively likely that it's at least $length in length, then it's probably better to use the second because it prevents having the whole node set constructed before its length is tested. If it's unlikely that the node set will be of length $length, then they're probably roughly equivalent. Would that be an accurate analysis? Thanks, Jeni --- Jeni Tennison http://www.jenitennison.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








