Re: [xml] Namespace handling for attributes when there's no namespace qualifier



On Sat, 2003-07-26 at 02:41, Sean McGuire wrote:
If I understand the namespace recommendation correctly, an attribute 
whose name is not qualified with a namespace is assumed to be in the 
same namespace as the element to which the attribute belongs.

No, that's not true (and a common error). See 5.2:

http://www.w3.org/TR/REC-xml-names/#scoping-defaulting

"Note that default namespaces do not apply directly to attributes."

Appendice A (non normative) is rather confusing, but if you read it
carefully you'll see that it confirms that statement and try to explain
it.

http://www.w3.org/TR/REC-xml-names/#Philosophy

Hope this helps.

Eric

-- 
Read me on Advogato.
                                         http://advogato.org/person/vdv/
------------------------------------------------------------------------
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
(W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema
------------------------------------------------------------------------




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]