[jdom-interest] Namespace handling ?

Christophe D. Laprun chris.laprun at nist.gov
Fri Jun 23 16:49:11 PDT 2000


Hi all,

I am trying to create a (not so) simple XML file without a namespace but
each time I try to parse it (using SAXBuilderDemo), I get the following
error:

org.jdom.IllegalNameException: The name "" is not legal for JDOM/XML
namespaces: Namespace URIs must be non-null and non-empty Strings..
	at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1225)
	at org.jdom.input.SAXBuilder.build(SAXBuilder.java:220)
	at org.jdom.input.SAXBuilder.build(SAXBuilder.java:287)
	at org.jdom.input.SAXBuilder.build(SAXBuilder.java:268)
	at SAXBuilderDemo.testBuilder(SAXBuilderDemo.java:99)
	at SAXBuilderDemo.main(SAXBuilderDemo.java:136)

Note also that there is a (very) minor bug since the message contains
two periods... Anyway, is there a way not to use namespaces (I cannot
think it is impossible) ? Am I doing something wrong ?  Here is the root
element of my document:

<!ELEMENT Corpus	( Metadata | Signal | SignalGroup
					| Anchor | Feature | Region | Annotation )*>
<!ATTLIST Corpus 
  id ID #REQUIRED
  version CDATA #FIXED "0.9">

Thanks.

Chris

-- 
Christophe Laprun    [Ingenieur ISIMA, France / Guest researcher @NIST]
web: http://www.nist.gov/speech/laprunch.htm
email: chris.laprun at nist.gov
phone: (301) 975 3191             fax: (301) 670 0939
--
The universe seems neither benign nor hostile, merely indifferent -
Sagan



More information about the jdom-interest mailing list