Re: Wath is the opposite of the union operator?
> I'm curious about what's going on behind the scenes (that is, in the > processor) that makes this expensive. without having looked behind the scenes, on the face of it count(.|B) is a very expensive operation (if "B" selects a large set of noders) as you have to take the set union | which invloves removing duplicates etc, then count the thing, which means that you need to fully evaluate all of B. All you actually need to know is is . in the set returned by B which you can ask in xpath 2 using the is operator (so it would be a lot more efficient even if except wasn't added as a primitive. With such a test you can stop and return true as soon as you have found the current node, just as B typically only causes a processor to evaluate one node, even though the formal semantics of the expression are that B is fully evaluated, sorted into document order, and then the first item is taken. David ________________________________________________________________________ This e-mail has been scanned for all viruses by Star. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk ________________________________________________________________________
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