xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Watts, Tim T" <timothy.wa...@bankofamerica.com>
Subject Namespaces inherited?
Date Thu, 13 Mar 2003 19:21:42 GMT

I read that child elements "inherit" the namespace of their parent by default ("Professional
Java SOAP", p30, Wrox Press). The W3C spec says that they're in scope for all children. But
that's not the same as inheriting. To my understanding, "inheriting" would mean that the children
automatically become members of the parent's namespace unless explicitly overridden while
"in scope" means that the namespace is merely *available* to the children. 

According to the book, the following examples are semantically equivalent:

<ns:elemA xmlns:ns="urn:myNS">
  <elemB/> <!-- this elem would implicitly be in the 'ns' namespace -->

<ns:elemA xmlns:ns="urn:myNS">

I don't think this is correct but I would like to hear from more knowledgable sources. The
behavior of the Xerces implementation of DOM does not conform to the above.

In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          general-unsubscribe@xml.apache.org
For additional commands, e-mail: general-help@xml.apache.org

View raw message