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: Namespaces? (was: Enlightenment via avoiding the T-word)

Evan Lenz wrote:
> Seairth Jacobs wrote:
> > The problem with the XML Namespace specification is that it is designed
> > disambiguate the two schemas at the document instance level.
> Sorry, but this is woefully inaccurate, and I'm sickened by the thought
> it might have been the XML Schemas spec that made you conclude this.

Sorry your are sick, but  XML Schemas itself has nothing to do with this.  I
was speaking in the generalized concept of a schema, not the specific
syntactic definition of one.  Yes, I understand that the spec does not
specify an explicit link between the Namespace name and a specific schema or
XML Schema.  However, one of the common practical uses of the Namespace is
to "scope" two conflicting elements such that they no longer conflict.  If
there is no conflict to start with, what is the value of the Namespace (esp.
if it it not explicitly tied to a schema definition)?

> Namespaces disambiguate names at the element or attribute name level. I'm
> sure someone out there will also qualify this as bad practice, but many of
> my company's document types (distinct de facto schemas) use the same
> namespace. There's nothing in the Namespaces spec that disallows us from
> doing this, or that makes us anticipate that 1-1 mappings between
> and schemas will be considered the world over to be the only reasonable
> practice.

Sure, there is nothing wrong with having several document types (schemas)
that use the same Namespace... as long as none of those document types that
have the same element declaration that can be used in the same exact XPath
are combined.  As soon as you have combined two document types into a new
document type, two elements of the same name and the same scoped usage will
conflict.  If they are both within the same Namespace, then the Namespace
here is useless.  You either have to start doing nested namespaces or you
have to rename one of the elements to avoid the conflict.  The nested
namespace concept is just too much to think about.  The renaming concept
goes back to what I was originally saying...

Seairth Jacobs