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 | [EMAIL PROTECTED] | 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:     [EMAIL PROTECTED]
To unsubscribe, e-mail:          [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to