[xquery-talk] Re: Attribute node whose parent is a document node

Michael Kay mhk at mhk.me.uk
Sat Jul 9 01:45:25 PDT 2005


You're missing that the serializer effectively wraps a document{}
constructor around your query to make the result into a document.
document{@x} gives you an error because you can't add an attribute node to a
document node.

Michael Kay
http://www.saxonica.com/

> -----Original Message-----
> From: talk-bounces at xquery.com 
> [mailto:talk-bounces at xquery.com] On Behalf Of Pierrick Brihaye
> Sent: 07 July 2005 22:18
> To: talk at xquery.com
> Subject: [xquery-talk] Re: Attribute node whose parent is a 
> document node
> 
> Hi,
> 
> Wolfgang Hoschek a écrit :
> 
> > The issue can be simplified to these two cases:
> > 
> > let $a := <county name="Devon"/>
> > return $a/@name (: W3C spec says top-level attributes can't be  
> > serialized :)
> 
> OK. I can understand that (perhaps more on this tomorrow ;-).
> 
> 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 ?
> 
> Cheers,
> 
> p.b.
> 
> 
> _______________________________________________
> talk at xquery.com
> http://xquery.com/mailman/listinfo/talk
> 





More information about the talk mailing list