[xquery-talk] Re: Attribute node whose parent is a document node
Pierrick Brihaye
pierrick.brihaye at free.fr
Fri Jul 8 00:30:51 PDT 2005
Hi again,
Pierrick Brihaye a écrit :
> My problem is that the error message was returned by :
>
> root/county/district/town
> or
> root/county/district/town/town
>
> At least 3 parents, uh ?
>
> I may be missing something obvious, but what ?
OK. I've got it. An easy demonstration from this query :
let $a := <county name="Devon"/>
let $b := "Devon"
return ($a/@name, $b)
With the -wrap paramter in Saxon, everything becomes clear :
<result:sequence xmlns:result="http://saxon.sf.net/xquery-results"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<result:attribute name="Devon"/>
<result:atomic-value xsi:type="xs:string">Devon</result:atomic-value>
</result:sequence>
In french : "il ne faut pas mélanger les torchons et les serviettes" :-)
Any hint on my <attribute>{$a/county/district/town/@name}</attribute>
processing ?
Thank you very much. Good night.
p.b.
More information about the talk
mailing list