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

Re: Global or shared namespace?


global namespace
Eric van der Vlist wrote:

> OTH, XML Infoset is clear that the elements or attributes "without
> namespaces" have no namespace name:
> 
> http://www.w3.org/TR/xml-infoset/#infoitem.element
> 
>    "1. [namespace name] The namespace name, if any, of the element type.
> If the element does not belong to a namespace, this property has no value".

And using a null or empty string is one way to represent this in the
face of code that is otherwise accustomed to comparing both a URI and a
local name.

> When a namespace is used, it is clear that I can compare
> "{http://example.org/ns}foo" with "{http://example.org/ns}foo" or with
> "{http://example.org/ns1}foo".
> 
> Considering that elements which do not belong to any namespace belong to a
> global, shared or default namespace and giving it a name might be confusing
> since people could think that "{http://whatever.org/global/namespace}foo"
> can be compared to "{http://whatever.org/global/namespace}foo" which is
> not always legitim and "{[no value]}foo" may give a better indication that
> there might be a problem.

This seems like circular reasoning to me. The reason we have namespaces
is so we can determine that one foo is different from another foo. If we
don't use namespaces, or if we assign all non-namespaced names to some
sort of global URI, we (obviously) can't determine this. I guess I don't
see an issue here.

> I any case, XPath considers that {[no value]}foo is identical to
> {[no value]}foo and this seems to be the only sensible position to adopt.

Agreed.

> With W3C XML Schema and the possibility to define different content models
> and different semantics to the same element type, the usage of the element
> type as a "name" seems to be broken.

This returns to the question of local vs. global elements in W3C
Schemas. I, for one, am not willing to reopen this :)

-- Ron

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.