Subject: Re: [xsl] XQuery/XPath 3.1: Node List to Node Set ("distinct nodes") From: "Dimitre Novatchev dnovatchev@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Wed, 29 Dec 2021 16:36:13 -0000 |
On Wed, Dec 29, 2021 at 12:21 AM Martin Honnen martin.honnen@xxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > Am 29.12.2021 um 00:32 schrieb Dimitre Novatchev dnovatchev@xxxxxxxxx: > > > > > > Hit Send too early: > > Do notice: this seems the only solution of all presented so far, that > preserves the original sequence order (not document order) of the nodes. > > Why is the original sequence order preserved? > https://www.w3.org/TR/xpath-functions/#func-distinct-values clearly says > > "The function returns the sequence that results from removing from $arg all > but one of a set of values that are considered equal to one another. [...] > > The order in which the sequence of values is returned is B7 > implementation-dependentB7 > <https://www.w3.org/TR/xpath-functions/#implementation-dependent>. > > Which value of a set of values that compare equal is returned is B7 > implementation-dependentB7 > <https://www.w3.org/TR/xpath-functions/#implementation-dependent>." > > > So while > > $nodes ! generate-id(.) > > gives you the generated ids in the order of the nodes in $nodes after the > call to distinct-values there is no order defined, it is implementation > dependent. > @Martin Honnen <Martin.Honnen@xxxxxx> Could you, please, give us an example of an existing XPath engine whose implementation of `distinct-values()` produces its results in any other order than their original order in the input sequence? Cheers, Dimitre > > > XSL-List info and archive <http://www.mulberrytech.com/xsl/xsl-list> > EasyUnsubscribe <http://lists.mulberrytech.com/unsub/xsl-list/782854> (by > email <>) > -- Cheers, Dimitre Novatchev --------------------------------------- Truly great madness cannot be achieved without significant intelligence. --------------------------------------- To invent, you need a good imagination and a pile of junk ------------------------------------- Never fight an inanimate object ------------------------------------- To avoid situations in which you might make mistakes may be the biggest mistake of all ------------------------------------ Quality means doing it right when no one is looking. ------------------------------------- You've achieved success in your field when you don't know whether what you're doing is work or play ------------------------------------- To achieve the impossible dream, try going to sleep. ------------------------------------- Facts do not cease to exist because they are ignored. ------------------------------------- Typing monkeys will write all Shakespeare's works in 200yrs.Will they write all patents, too? :) ------------------------------------- Sanity is madness put to good use. ------------------------------------- I finally figured out the only reason to be alive is to enjoy it.
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] XQuery/XPath 3.1: Node Li, Martin Honnen martin | Thread | Re: [xsl] XQuery/XPath 3.1: Node Li, Martin Honnen martin |
Re: [xsl] XQuery/XPath 3.1: Node Li, Eliot Kimber eliot.k | Date | Re: [xsl] XQuery/XPath 3.1: Node Li, Dimitre Novatchev dn |
Month |