[Home] [By Thread] [By Date] [Recent Entries]
As to Patrikbs question bwhyb?
1. bWhyb in the sense of bwhere is this behavior specified?b https://www.w3.org/TR/xpath-31/#id-path-operator If every evaluation of E2 returns a (possibly empty) sequence of nodes, these sequences are combined, and duplicate nodes are eliminated based on node identity. The resulting node sequence is returned in document order. 2. Why is it specified to behave like this? Probably because of the deduplication requirement. If the right-hand side expression E2 initially returns the sequences (c, b, a) and (a, b) *and* you want to deduplicate the combined sequence, there will be an ambiguity whether to return (c, a, b) or (c, b, a). With the additional document order requirement it will reduce to (a, b, c) if we assume that this reflects the document order. 3. Which purpose does the deduplication requirement serve? I think this comes in very handy at times. As Martin said, you can use the ! operator or a 'for $var in E1 return ($var/a, $var/b)' expression if you want the post-/ evaluation results returned in this particular order and if you donbt want to repeat E1. Gerrit Gerrit On 08/03/2018 07:54, Martin Honnen martin.honnen@xxxxxx wrote: Am 08.03.2018 um 07:36 schrieb Dr. Patrik Stellmann patrik.stellmann@xxxxxxxxx:You can move to XPath/XSLT 3 and use the "!" operator
Registergericht / Commercial Register: Amtsgericht Leipzig Registernummer / Registration Number: HRB 24930 GeschC$ftsfC<hrer / Managing Directors: Gerrit Imsieke, Svea Jelonek, Thomas Schmidt
|

Cart



