RE: [XQuery] Create namespace node for xs:QName

I think the current rules are easy to understand and to implement.
Trying to second guess what it could be is a bad idea. The only way to
get this to validate without error would be that you have to add all
static in-scope namespaces (even those used for functions) to the
element nodes or treat xs in the same way as we treat xml. The later
looks doable, but unlike the xml prefix (that does not need to be given
explicitly), do we now require serialization of the xs namespace for
every element? And what about user-defined namespaces for types (for
which we also have specified a prefix in the query prolog)?

Best regards
Michael

> -----Original Message-----
> From: public-qt-comments-request@w3.org [mailto:public-qt-comments-
> request@w3.org] On Behalf Of Michael Kay
> Sent: Wednesday, February 11, 2004 4:45 PM
> To: 'Jonathan Robie'; 'XML Query Comments'
> Subject: RE: [XQuery] Create namespace node for xs:QName
> 
> 
> > The XQuery document notes that the following element
> > constructor fails with a validation error:
> >
> >     <p xsi:type="xs:integer">3</p>
> >
> > This is an unpleasant surprise for users - and there is a
> > simple solution. The specification already requires
> > implementations to create a namespace node for each namespace
> > used in an element or attribute
> > name:
> 
> <snip/>
> >
> > A similar rule should be added to create a namespace node
> > for each namespace used in an instance of the xs:QName type.
> >
> 
> But how do you know it's a QName until you've validated it, and how do
> you validate it if there is no namespace node?
> 
> Michael Kay

Received on Thursday, 12 February 2004 04:22:05 UTC