XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] Default namespace for attributes?

On 7/16/06, Jirka Kosek <jirka@kosek.cz> wrote:
My own understanding is that attribute is always related to an element
on which it appears. So you can know identity of unnamespaced attribute
if you take current element into account, and you will save few bits of
memory when parsing and processing XML.

If it was like this then it was fine. But I think the spec doesn't implies this.

Please consider this XML:

<a xmlns="http://my.com/namespace";>
 <x xyz="hello" />
</a>

for element a, the namespace declaration is present for the null
prefix. This is known as the default namespace.

Now what namespace binding applies to element x and attribute xyz. To
element x, the default namespace applies (http://my.com/namespace).
But attribute xyz is in the null namespace (i.e. there is no namespace
binding applicable to it). This is what that looks illogical to me.

Regards,
Mukul


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]





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

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