Hi Tim, A general XML development list would probably be a better place to discuss issues like this than this list--whose primary purpose is to discuss issues common to multiple xml.apache.org projects...
Anyway: No, the two examples are certainly not semantically equivalent. It is true that descendant are in the scope of namespace prefixes declared by their ancestors. But the first elemB doesn't actually use the namespace prefix declared in its parent, so it isn't in that namespace; the second does, therefore it is in the same namespace as the parent. Hope that helps, Neil Neil Graham XML Parser Development IBM Toronto Lab Phone: 905-413-3519, T/L 969-3519 E-mail: [EMAIL PROTECTED] |---------+---------------------------------> | | "Watts, Tim T" | | | <[EMAIL PROTECTED]| | | merica.com> | | | | | | 03/13/2003 02:21 PM | | | Please respond to | | | general | | | | |---------+---------------------------------> >---------------------------------------------------------------------------------------------------------------------------------------------| | | | To: [EMAIL PROTECTED] | | cc: | | Subject: Namespaces inherited? | | | | | >---------------------------------------------------------------------------------------------------------------------------------------------| Hello, 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> <ns:elemA xmlns:ns="urn:myNS"> <ns:elemB/> </ns:elemA> 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: [EMAIL PROTECTED] To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- In case of troubles, e-mail: [EMAIL PROTECTED] To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]