[jdom-interest] Re: problem with JDOM / Namespaces (Brett McLaughlin)

Humphrey Sheil Humphrey.Sheil at Kadius.com
Fri Aug 4 04:42:24 PDT 2000


Some more information on the topic of colons in Elements and Attributes.  I
was having the same problem and  am working against a CVS snapshot from
8/3/2000 7 pm GMT.

Results:

org.jdom.Verifier

2 methods affected - checkAttributeName and checkElementName

checkAttributeName  does specific checks for xml:space and xml:lang but
rejects anything else.

checkElementName rejects all Elements with a name containing a colon.

I commented out both checks and I can now create my documents just fine
(because I've shortcircuited the validation).  Now when I try and read them
in using SAXBuilder I get a null pointer, however when I tried to debug this
by loading it using DOMBuilder instead, it worked just fine - DOMBuilder
didn't throw any exceptions and I can process the XML file correctly.
Here's the stack trace, looks like it's xerces that can't handle the colons?


Humphrey





org.jdom.JDOMException: null: null 	at
org.jdom.input.SAXBuilder.build(SAXBuilder.java:278) 	at
org.jdom.input.SAXBuilder.build(SAXBuilder.java:403) 	at
com.kadius.cms.publication.PublicationHelper.getXmlDocument(PublicationHelpe
r.java:130) 	at
com.kadius.cms.navigation.NavigationManager.addContentReferenceToCategory(Na
vigationManager.java:180) 	at
com.kadius.cms.publication.PublicationManager.publishContent(PublicationMana
ger.java, Compiled Code) 	at
com.kadius.cms.publication.PMTest.doWork(PMTest.java:224) 	at
com.kadius.cms.publication.PMTest.<init>(PMTest.java:56) 	at
com.kadius.cms.publication.PMTest.main(PMTest.java:69) Root cause:
java.util.EmptyStackException 	at
org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1225) 	at
org.jdom.input.SAXBuilder.build(SAXBuilder.java:258) 	at
org.jdom.input.SAXBuilder.build(SAXBuilder.java:403) 	at
com.kadius.cms.publication.PublicationHelper.getXmlDocument(PublicationHelpe
r.java:130) 	at
com.kadius.cms.navigation.NavigationManager.addContentReferenceToCategory(Na
vigationManager.java:180) 	at
com.kadius.cms.publication.PublicationManager.publishContent(PublicationMana
ger.java, Compiled Code) 	at
com.kadius.cms.publication.PMTest.doWork(PMTest.java:224) 	at
com.kadius.cms.publication.PMTest.<init>(PMTest.java:56) 	at
com.kadius.cms.publication.PMTest.main(PMTest.java:69) 




More information about the jdom-interest mailing list