[jdom-interest] Bug??
Per Kreipke
per at onclave.com
Fri Apr 20 13:06:45 PDT 2001
Using JDOM 1.0b6,
On line 403 of DOMBuilder.java, in the processing of DOM Elements, the name
for the new JDOM Element is taken from the localname of the DOM Element.
However, according to the language of the DOM Core Level 2 (under the Node
section):
"localName of type DOMString, readonly, introduced in DOM Level 2
Returns the local part of the qualified name 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
interface, this is always null."
The emphasis in my case is on 'nodes created with a DOM Level 1 method'. I'm
using Xerces 1.3.1 and Xalan 1.2.2 and when I transform my input document
and then try to transform it to JDOM, I get an error:
org.jdom.IllegalNameException: The name "null" is not legal for JDOM/XML
elements: XML names cannot be null or empty.
at org.jdom.Element.<init>(Element.java:137)
at org.jdom.Element.<init>(Element.java:160)
at org.jdom.input.DOMBuilder.buildTree(DOMBuilder.java:409)
at org.jdom.input.DOMBuilder.build(DOMBuilder.java:373)
...
Comments?
Per.
More information about the jdom-interest
mailing list