xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Elliotte Rusty Harold <elh...@metalab.unc.edu>
Subject Re: Namespaces inherited?
Date Thu, 13 Mar 2003 19:25:46 GMT
At 2:21 PM -0500 3/13/03, Watts, Tim T wrote:

>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>

The book is wrong. These are not equivalent. In the first example 
elemB is in no namespace. It is most definitely *not* in the urn:myNS 
namespace.
-- 

+-----------------------+------------------------+-------------------+
| Elliotte Rusty Harold | elharo@metalab.unc.edu | Writer/Programmer |
+-----------------------+------------------------+-------------------+
|           Processing XML with Java (Addison-Wesley, 2002)          |
|              http://www.cafeconleche.org/books/xmljava             |
| http://www.amazon.com/exec/obidos/ISBN%3D0201771861/cafeaulaitA  |
+----------------------------------+---------------------------------+
|  Read Cafe au Lait for Java News:  http://www.cafeaulait.org/      |
|  Read Cafe con Leche for XML News: http://www.cafeconleche.org/    |
+----------------------------------+---------------------------------+

---------------------------------------------------------------------
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


Mime
View raw message