[jdom-interest] builders not preserving namespace attributes in xsl files

Ed Morehouse EMorehouse at fool.com
Tue Oct 10 14:45:01 PDT 2000


Brett McLaughlin wrote:
>   I think I got attribute namespaces working correctly in Beta 5. At
> least, I tested some documents with namespaces on just attributes (see
> the contents.xml file in the samples directory of the JDOM core module),
> and they worked. Now, mind you, this isn't declarations that aren't used
> or multiple declarations on elements yet, as that is still in progress;
> but attributes that have prefixes and namespaces should now be working.
> 
> Let me know, OK?
> 
> Thanks,
> Brett
-- 

Hi Brett, 

I checked out the latest sources from CVS today and tried building the
contents.xml file in the samples directory using both SAXBuilder and
DOMBuilder.  In the case of SAXBuilder, it worked like a charm, but DOMBuilder
choked on the following exception:

Exception in thread "main" org.jdom.JDOMException: The name "ora:category" is
not legal for JDOM/XML attributes: Attribute names cannot contain colons.: The
name "ora:category" is not legal for JDOM/XML attributes: Attribute names cannot
contain colons.
	at org.jdom.input.DOMBuilder.build(DOMBuilder.java:194)
	at org.jdom.input.DOMBuilder.build(DOMBuilder.java:216)
	at BugDemo.demoBug(BugDemo.java:41)
	at BugDemo.main(BugDemo.java:19)
Root cause: org.jdom.IllegalNameException: The name "ora:category" is not legal
for JDOM/XML attributes: Attribute names cannot contain colons.
	at org.jdom.Attribute.<init>(Attribute.java:107)
	at org.jdom.Attribute.<init>(Attribute.java:151)
	at org.jdom.Element.addAttribute(Element.java:1205)
	at org.jdom.input.DOMBuilder.buildTree(DOMBuilder.java:358)
	at org.jdom.input.DOMBuilder.buildTree(DOMBuilder.java:296)
	at org.jdom.input.DOMBuilder.build(DOMBuilder.java:191)
	at org.jdom.input.DOMBuilder.build(DOMBuilder.java:216)
	at BugDemo.demoBug(BugDemo.java:41)
	at BugDemo.main(BugDemo.java:19)




More information about the jdom-interest mailing list