[xquery-talk] Rookie XQuery Question: Nested For Loops
Michael Kay
mike at saxonica.com
Fri Apr 27 17:37:34 PDT 2007
> And a good quiz question for the experts is, can the curlies
> affect the semantics?
>
> That is, is there any difference between:
>
> <a><b/></a>
>
> and
>
> <a>{<b/>}</a>
>
What, no takers? To let you out of your misery, given the following query
declare copy-namespaces no-preserve, inherit;
<doc>
<a>{<b xmlns:p="q"/>}</a>
<a><b xmlns:p="q"/></a>
</doc>
The correct output, I believe, is:
<doc>
<a>
<b/>
</a>
<a>
<b xmlns:p="q"/>
</a>
</doc>
Michael Kay
http://www.saxonica.com/
More information about the talk
mailing list