[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: QNames ain't UNames (was QName madness)


unames

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.
> 
>

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.