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] Global/Local attributes

[ Lists Home | Date Index | Thread Index ]

From: "Simon St.Laurent" <simonstl@simonstl.com>
>
> At 09:51 PM 8/1/2002 -0400, Benderjgxd@aol.com wrote:
> >In a message dated 8/1/2002 8:36:12 PM Central Daylight Time,
> >dareo@microsoft.com writes:
> >
> >
> >>What is broken is the existence of a default namespace. Further mangling
> >>Namespaces in XML to accomodate this mistake is unwise and borders on
> >>foolishness.
> >
> >
> >I disagree. What is broken is the possibility of local naming, where any
> >namespaces are used. Or rather, what XML Schema seems to call unqualified
> >names.
>
> That  cuts even closer than Dare's original posting - I'd considered the
> setting of the default namespace to "" when I read his.
>
> Mixing qualified and unqualified seems to be a more fundamental problem
> than whether or not we slap prefixes on things.

So are you saying that if a document uses namespaces, everything in the
document should be qualified (regardless of the prefix issue)?  It seems to
me that Dare's solution would mean that implicitly.  The following XML is
fully qualified:

<elem1 xmlns:x="http://example.com/";>
    <x:elem2 x:attr1="" attr1="" />
</elem1>

Obviously, "x:elem2" and "x:attr1" are qualified.  But "elem1" and "attr1"
are qualified at this point as well.  They belong to the "document's
namespace" (goes back the the "local" v. "global" thing I was saying).  The
fact that nothing in the above XML is ambiguous means to me that everything
is qualified (regardless of whether it has a "namespace prefix" attached to
it).

The problem with default namespaces is that ambiquity creeps in when you
also want to use elements/attributes that belong to the document's
namespace.  You have to add rules like "attributes are not in the default
namespace" and "if you encounter an xmlns='', this undoes the default
namespace so that you can have access to the document namespace elements".
And each time we turn around, throw in another caveat to solve some other
discrepancy in the default namespace concept.  By taking out the default
namespace, everything is simplified (and don't we all love simplification)
and we end up with "guaranteed" fully qualified documents at the same time.

---
Seairth Jacobs
seairth@seairth.com





 

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

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