[jdom-interest] Crimson bug

Elliotte Rusty Harold elharo at metalab.unc.edu
Sat Sep 1 16:49:31 PDT 2001


The following legal though strange document is choking Crimson, though 
Xerces gets it right:

<?xml-stylesheet href="text/css" href="stylesheet.css?>
<test/>

The specific errors are:

org.jdom.JDOMException: Error on line 1 of document 
file:/D:/xml/XINCLUDE/test.xml: Expected "version=...".
        at org.jdom.input.SAXBuilder.build(SAXBuilder.java:363)
        at org.jdom.input.SAXBuilder.build(SAXBuilder.java:771)
        at 
com.macfaq.xml.XIncluder.main(src/com/macfaq/xml/XIncluder.java:536)
Caused by: org.xml.sax.SAXParseException: Expected "version=...".
        at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3030)
        at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3024)
        at 
org.apache.crimson.parser.Parser2.maybeReadAttribute(Parser2.java:1019)
        at org.apache.crimson.parser.Parser2.readVersion(Parser2.java:1045)
        at org.apache.crimson.parser.Parser2.maybeXmlDecl(Parser2.java:997)
        at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:485)
        at org.apache.crimson.parser.Parser2.parse(Parser2.java:304)
        at 
org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:433)
        at org.jdom.input.SAXBuilder.build(SAXBuilder.java:354)
        at org.jdom.input.SAXBuilder.build(SAXBuilder.java:771)
        at 
com.macfaq.xml.XIncluder.main(src/com/macfaq/xml/XIncluder.java:536)

Is there a way t0 tell the builder I want to use Xerces instead? And 
perhaps we should switch the default parser to Xerces until Crimson gets 
this right?

--
Elliotte




More information about the jdom-interest mailing list