[xquery-talk] Node sequences and Path Expressions

Torsten Grust grust at in.tum.de
Fri Nov 4 09:57:40 PST 2005


On 11/4/05 9:45 AM, Pierrick Brihaye wrote with possible deletions:
> Hi,
> 
> For the following statement :
> 
> let $a := <x><y><z/></y></x>
>   return ($a, $a/*)/* 
> 
> Saxon 8.6 ;-) returns :
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <y>
>    <z/>
> </y>
> <z/>

This order is required by the XPath step semantics (in this case, the
outer child::* step is relevant): the result has to be returned in
document order (with duplicates removed).  Since the y element node
occurs before the z element node in document order (in the mini XML
fragment bound to variable $a), the order is fixed.

> [...]
> Is the first ordering implementation dependent or is it fixed by some spec ?

Regards,
   --Torsten
-- 
  | Prof. Dr. Torsten Grust                         grust at in.tum.de |
  |                                 http://www-db.in.tum.de/~grust/ |
  |     Database Systems - Technische Universität München (Germany) |


More information about the talk mailing list