Subject: Re: [xsl] What does //distinct-values(...) mean? From: "Martin Honnen martin.honnen@xxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Wed, 8 Apr 2020 12:25:27 -0000 |
Hi Folks,
I executed this XPath query in Oxygen:
//distinct-values(//Row[matches(Advertiser, 'TS3', 'i')]/Subscribers)
The two slashes at the beginning were an accident. At the bottom of the
screen Oxygen shows the matches. All of a sudden it showed 111,000 matches, then a moment later 438,000 matches, and then finally 525,946 matches.
matches. How can there be half a million matches?"
"Yikes!" I thought, "What is going on? There is supposed to be around 17
function?" I thought.
Then I saw the two slashes at the start.
"Hmm, what is the meaning of two slashes preceding the distinct-values
distinct-values function? Why does its evaluation result in so many matches?
So, I ask you: what is the meaning of two slashes preceding the
// is short for /descendant-or-self::node()/ so //distinct-values(//Row[matches(Advertiser, 'TS3', 'i')]/Subscribers) is /descendant-or-self::node()/distinct-values(//Row[matches(Advertiser, 'TS3', 'i')]/Subscribers) meaning it returns distinct-values(//Row[matches(Advertiser, 'TS3', 'i')]/Subscribers) as many times as the document has any nodes selectable by /descendant-or-self::node().
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] What does //distinct-values(., Costello, Roger L. c | Thread | Re: [xsl] What does //distinct-valu, Dimitre Novatchev dn |
[xsl] What does //distinct-values(., Costello, Roger L. c | Date | Re: [xsl] What does //distinct-valu, Costello, Roger L. c |
Month |