[Home] [By Thread] [By Date] [Recent Entries]
Hi David,
At 03:15 PM 12/16/2003, you wrote: > > > node:definition/*[not(name() = name(preceding-sibling::*))] > > > >Why should this take a long time? Isn't this the same as > > > >*[not(name() = name(preceding-sibling::*[last()]))] > > preceding-sibling::*[last()]), which therefore won't de-duplicate properly. > > So it won't take a long time, and it won't work either. I don't believe so, in XPath 1.0, since we have to test one value (the name of the context node) against many values (the names of the other nodes in the set) ... and while the equality rule for node sets allows us to do such a test, there's no way to get the set of names we want into a node set for testing. This can presumably, however, be done in XPath 2.0, since it can create sequences on the fly. Cheers, Wendell
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|

Cart



