[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Showstopper issue with new Attribute text


showstopper text
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@m...
   Effective XML (Addison-Wesley, 2003)
   http://www.cafeconleche.org/books/effectivexml            
   http://www.amazon.com/exec/obidos/ISBN%3D0321150406/ref%3Dnosim/cafeaulaitA 

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.