[Home] [By Thread] [By Date] [Recent Entries]
On 02/11/2012 13:01, Dimitre Novatchev wrote:
That solution is wrong because the context for child::Websites is different inside the predicate.count(Websites/*) = count(distinct-values(Websites/*))A more efficient version (for an XPath processor with weak optimizer) of this is: In some circumstances it would work in the form not(//Websites/*[count(distinct-values(//Websites/*))+1]) But that solution is more dependent on a smart optimizer than the original, because a naive engine will reevaluate the predicate once for every node selected; and the performance of an unoptimized implementation of the original is still (almost) linear, whereas an unoptimized implementation of the latter is quadratic. Michael Kay Saxonica
|

Cart



