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

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   RE: XML Schema Question: default namespace misses attributes

[ Lists Home | Date Index | Thread Index ]
  • From: rev-bob@gotc.com
  • To: xml-dev@xml.org
  • Date: 09 Feb 2000 11:32:51 -0500

> ** Original Sender: Stefan Haustein <haustein@kimo.cs.uni-dortmund.de>
>
> Roger L.Costello wrote:
> >
> > Wouldn't it be better if, as is done in the XSLT spec, we don't use a
> > default namespace and, instead, explicitly qualify all elements and
> > attributes?
> 
> The problem is that it makes a difference whether an attribute has 
> a namespace or no namespace at all. The intention is probably to 
> distinguish between namespace-global attributes that can occur in 
> every element like xml:lang and attributes local to an element. 

[snip]
 
> I do not like the idea to of having namespaces for attributes 
> very much because it seems to cause more confusion than benefit. 
> Personally, I would prefer if the attributes' namespace would always 
> default to the element's namespace.  

I've said it before, but I think this latter concept is the way to go.  I
originally expressed this in inheritance terms, ie. attributes should
"inherit" their element's namespace by default, but it's just a different
spin on the same effective model.  There are certain attributes that
are and should remain global in scope; xml:lang is a prime example.
Most of the time, though, an attribute is meaningless without some
syntactic connection to the element which contains it - and thus it
only makes sense to set the default assumption as "the attribute is
in the element's namespace".  Once you've carefully defined an
element and its various attributes in a custom DTD, you just shouldn't
have to jump through hoops to associate the attributes with that
element.  That association is already in the DTD and is implicit in
the code even without a DTD; for what good reason should it be
broken by default?



 Rev. Robert L. Hood  | http://rev-bob.gotc.com/
  Get Off The Cross!  | http://www.gotc.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