[jdom-interest] Crimson bug

Jon Baer jonbaer at digitalanywhere.com
Wed Sep 5 17:45:20 PDT 2001


Hey can I ask a question ...

Why is it that on mainly all the parsers I use that <?xml version="1.0"?> is a
*required* factor?  Im not sure if this relates to this bug but if its considered a
PI for mainly all applications which may use a stylesheet in the end shouldn't this
be an optional factor?

I never quite understood that.

- Jon

Elliotte Rusty Harold wrote:

> 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
>
> _______________________________________________
> To control your jdom-interest membership:
> http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost.com




More information about the jdom-interest mailing list