W3C home > Mailing lists > Public > public-qt-comments@w3.org > March 2003

RE: XQuery 1.0 - 4.1 Namespace declarations

From: Kay, Michael <Michael.Kay@softwareag.com>
Date: Wed, 5 Mar 2003 01:39:18 +0100
Message-ID: <DFF2AC9E3583D511A21F0008C7E621060453E109@daemsg02.software-ag.de>
To: Svgdeveloper@aol.com, public-qt-comments@w3.org



> -----Original Message-----
> From: Svgdeveloper@aol.com [mailto:Svgdeveloper@aol.com] 
> Sent: 04 March 2003 16:17
> To: public-qt-comments@w3.org
> Subject: XQuery 1.0 - 4.1 Namespace declarations
> 
> 
> 
> The following example, is not totally clear - at least to me.
> 
> declare namespace xx = "http://example.org"
> let $i := <foo:bar xmlns:foo = "http://example.org">
> <foo:bing> Lentils </foo:bing>
> </foo:bar>
> return $i/xx:bing
> 
> The example is intended to illustrate that namespace prefixes 
> need not be 
> identical for two names to match.
> 
> However, I am unclear (I appreciate that 2.5 Variable 
> Bindings is under 
> review) whether $i in the example is intended to bind to the 
> structure <foo:bar xmlns:foo = > "http://example.org"> 
> <foo:bing> Lentils </foo:bing> 
> </foo:bar>
> 
> or only to the outer <foo:bar> element node.
> 

The value of $i is an element node, the <foo:bar> element node, and this
element node has a child <foo:bing> element node, which in turn has a child
text node. You can think of $i as referring to the whole tree rooted at the
<foo:bar> element, but technically the value of the variable is the single
element node at the root of the tree.

Michael Kay
Received on Tuesday, 4 March 2003 19:39:26 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:14:24 GMT