classpathx-xml
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Classpathx-xml] AElfred DOM local names are incorrect for text, comment


From: Elliotte Rusty Harold
Subject: [Classpathx-xml] AElfred DOM local names are incorrect for text, comment, and document nodes
Date: Thu, 13 Dec 2001 13:13:44 -0500
User-agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:0.9.6) Gecko/20011120

I've noticed that AElfred's DOM implementation reports #text as the *local* name for text nodes, #comment as the local name for comment nodes, and #document as the local name for document nodes. It's probabaly doing something similar for document fragment and CDATA section nodes though I haven't tested this.

According to the DOM2 core spec these are suposed to be null. Only the node name, not the local name, uses the sharp-sign prefixed names. Specifically:

| localName| of type | DOMString| <http://www.w3.org/TR/DOM-Level-2-Core/core.html#DOMString>, readonly, introduced in *DOM Level 2*
   Returns the local part of the / qualified name/
   <http://www.w3.org/TR/DOM-Level-2-Core/glossary.html#dt-qualifiedname>
   of this node.
   For nodes of any type other than |ELEMENT_NODE| and |ATTRIBUTE_NODE|
   and nodes created with a DOM Level 1 method, such as |createElement|
   from the | Document|
   <http://www.w3.org/TR/DOM-Level-2-Core/core.html#i-Document>
   interface, this is always |null|.

Xerces gets this right. I haven't tested Crimson or Oracle yet.
--
+-----------------------+------------------------+-------------------+
| Elliotte Rusty Harold | address@hidden | Writer/Programmer |
+-----------------------+------------------------+-------------------+ | Java I/O (O'Reilly & Associates, 1999) |
|            http://www.ibiblio.org/javafaq/books/javaio/            |
|   http://www.amazon.com/exec/obidos/ISBN=1565924851/cafeaulaitA/   |
+----------------------------------+---------------------------------+
| Read Cafe au Lait for Java News: http://www.cafeaulait.org/ | | Read Cafe con Leche for XML News: http://www.ibiblio.org/xml/ |
+----------------------------------+---------------------------------+





reply via email to

[Prev in Thread] Current Thread [Next in Thread]