|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Fwd: complex XPATH test
> For starters, there has to be a better way of returning the > position of a > node within a node set than what I used here (the for-each > block). Anyone > have any ideas? The only alternative that comes to mind is count(xx:intersection($nodeset, preceding::node())) where xx:intersection can be done either using an extension function or using $x[count(.|$y)=count($y)] But your method is probably faster! (The other approach is to ask whether you couldn't have determined/retained the position at the time the node-set was being built in the first place). > Second, why is it that ".=$curr" tests the value of each > against each other, > rather than a 'node id' or something? Wouldn't it make sense > for that to > actually check that the nodes are equivalent It certainly would make sense for XPath to provide a node-identity test; whether it would have been better to use the "=" operator for that purpose is an unanswerable question. Mike Kay > 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








