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


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [xml-dev] Global or shared 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.


> 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