Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


RE: Why does the default namespace not apply to attributes?

From: "Michael Kay" <mike@--------.--->
To: "'Nanda Kol'" <nandakol@-------.--->, <noah_mendelsohn@--.---.--->
Date: 8/20/2007 2:32:00 PM
 > Please, don't misunderstand my question; it is absolutely not my
intention to suggest changes to the XML spec, rather my aim is to to find
out what is the rationale for the difference between elements and attributes
with regard to the default namespace. 
 
The rationale, I think, is that attributes normally have meanings and
definitions that are local to the element in which they appear; when that is
the case, putting them in a namespace serves no useful purpose.
 
Of course it's also sometimes true that child elements have meanings and
definitions that are local to the parent element in which they appear; and I
think that's why the XML Schema spec allows the option
elementFormDefault="unqualified". In practice though I think this option is
rarely used and certainly is rarely recommended. The most common practice is
to put child elements in the same namespace as their parents.
 
One could argue this is inconsistent - but if there were no differences
between elements and attributes then there would be no point in XML
providing both.
 
Michael Kay
http://www.saxonica.com/



transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent