Subject: Re: [xsl] [Summary] Three ways to express in XPath that there are no duplicates in a list of items From: Michael Kay <mike@xxxxxxxxxxxx> Date: Fri, 02 Nov 2012 13:30:54 +0000 |
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:
not(Websites/*[count(distinct-values(Websites/*))+1])
So, we only count up to: count(distinct-values(Websites/*))+1
and don't need to count all children of Websites and then compare them to the count of distinct values.
Michael Kay Saxonica
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] [Summary] Three ways to e, Dimitre Novatchev | Thread | Re: [xsl] [Summary] Three ways to e, Wendell Piez |
Re: [xsl] Template for node-set par, Wendell Piez | Date | Re: [xsl] hierarchic counting in fl, Norbert Heidbrink |
Month |