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

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Showstopper issue with new Attribute text

[ Lists Home | Date Index | Thread Index ]

At 9:11 AM -0500 3/5/04, David Megginson wrote:


>* 2004-0004: xmlns Namespace
>
>- commit paragraph from CVS Attributes.java about xmlns-uris feature
>
>- document interaction between xmlns-uris and namespace-prefixes
>   features

I do not agree with this text. It has very damaging effects. I think 
this may be a mistake and shouldn't be too hard to fix. Specifically, 
it states:

  (The attribute's "local name" will be the prefix, or the empty 
string when defining a default element namespace.)

Consider this element: <name xmlns="http://www.example.com"/>
The proposed text says that this element's attribute has the local 
name of an empty string and the qualified name xmlns. I don't buy it. 
With or without namespaces, with or without Namespaces 1.1, the local 
name of an attribute is never the empty string. the local name of 
this attribute (if it's reported at all) is "xmlns", not "".

Furthermore, I think in this element the xmlns attribute is no 
namespace, according to the Namespace 1.1 recommendation. (I could be 
wrong about that, but it's how I read the spec.)

This paragraph *must* be rewritten to make it clear that this all 
applies only to xmlns:prefix attributes, not to xmlns attributes that 
declare a default namespace. I propose the following text:

The list will not contain attributes that were declared #IMPLIED but 
not specified in the start tag. It will also not contain attributes 
that declare namespace prefixes (xmlns:*) unless the 
http://xml.org/sax/features/namespace-prefixes feature is set to true 
(it is false by default). Because SAX2 conforms to the original 
"Namespaces in XML" recommendation, it normally does not give 
namespace declaration attributes a namespace URI.

Some SAX2 parsers may support using an optional feature flag 
(http://xml.org/sax/features/xmlns-uris) to request that those 
attributes be given URIs, conforming to a later 
backwards-incompatible revision of that recommendation. (The 
attribute's "local name" will be the prefix.)For portability, handler 
code should always resolve that conflict, rather than requiring 
parsers that can change the setting of that feature flag.  xmlns 
attributes that declare a default namespace do not have a namespace 
in any version of the namespaces specification, and thus this feature 
has no effect on them.

-- 

   Elliotte Rusty Harold
   elharo@metalab.unc.edu
   Effective XML (Addison-Wesley, 2003)
   http://www.cafeconleche.org/books/effectivexml            
   http://www.amazon.com/exec/obidos/ISBN%3D0321150406/ref%3Dnosim/cafeaulaitA 




 

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

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