OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] QNames ain't UNames (was QName madness)

[ Lists Home | Date Index | Thread Index ]


as of 14.1.1999 xml ceased to be about annotating text and became a means to encode values. only some of which are strings. annotated text became a structured
value, subject to encoding and decoding rules. the 'qname' misnomer witnesses an attempt to ignore this. as soon as one admits it, one admits both the
encoding's authority and its transience, the answer to the question cited below follows directly from encoding rules, and the problem evaporates.

(i would have preferred, a this point, to refer the reader to ancient examples posted to xml-dev on this question, but the oasis archive won't search for me at
the moment.)

i suspect the view is not popular, but an xpointer string has no more meaning when taken out of an encoding context that a similarly examined qname would.

or, would someone like to promote a qname encoding with locally defined namespace declarations?

...

Dare Obasanjo wrote:
> 
> *cough* *cough*
> Now I see the problem. You are a victim of the W3C XML Schema (and XQuery) working groups misunderstanding of the Namespaces in XML REC. A QName is a {prefix, localname} pair not a {URI, localname} pair. Unfortunately this definition is so useless that some people have decided to treat it as the latter even though lexically they can't get around the fact that it's the former.
> 
> Here's a test question for the  folks that think QNames are isomorphic to URIs. Given the schema
> 
>  [example elided]
> 
> In the above scenario what value should be inserted into the Node element upon validation? Should it be "ex2:FtpSite" even the ex2 prefix is mapped to a different namespace in the instance document than in the schema? Maybe it should be "foo:FtpSite" because the prefix "foo" is mapped to the same namespace that "ex2" was mapped to in the schema. But then what would have happened of no XML namespace declaration existed for the ftp://ftp.example.com namespace? Would a namespace declaration have to be inserted into the XML?
> 
> Now ask yourself if the xs:anyURI type has this problem. I can construct similar problems using XQuery but this email is long enough as is.
> 
>




 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS