W3C home > Mailing lists > Public > www-ql@w3.org > April to June 2005

Re: Variable references in path expressions

From: TAN Kuan Hui <kuanhui@xemantics.com>
Date: Fri, 29 Apr 2005 09:59:22 +0800
Message-ID: <005f01c54c5f$1e864fd0$6402a8c0@pinecone>
To: "martin" <martin@x-hive.com>, "Michael Kay" <mhk@mhk.me.uk>
Cc: "'Charles Brooking'" <charles.brooking@research.canon.com.au>, <www-ql@w3.org>

>
> I might be mistaken, but I think he wants to do this:
>  > let $a := (<a/>,<b/>,<c/>)
>  > let $b := (xs:QName("b"), xs:QName("c"))
>  > return $a/$b
> .. would lead to $a being filtered by $b's QNames on the child axis, so
> the result would be <b/>,<c/> (e.g. what you would get by
> $a/element($b)). I've noticed that some people tend to understand
> Variable references in XQuery PathSteps this way.
>
Following your argument, $b then should simply be treated
as a sequence of values; applying the element() construct to it does not
change the sequence of item values into XQuery parsing tokens.

I am not sure this works in the current semantics because path
expression expects a QName for Name tests not an element
at the time of parsing.
Received on Friday, 29 April 2005 01:59:49 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:17:17 UTC