[jdom-interest] Crimson and DTD resolution

Jason Hunter jhunter at collab.net
Tue Jul 31 12:05:04 PDT 2001

Which build() variety did you use?  The parser is complaining that it
can't determine the current dir, which happens if for example you only
passed a stream to the parser.


Fred Clewis wrote:
> I typically have a lot of xml such the OAG example below that reference
> their DTD as:
>      <!DOCTYPE SYNC_CUSTOMER_005 SYSTEM "007_sync_customer_005.dtd">
> The convention is to access the file in the current directory and not
> complicate the portability of the file with references such as
> "file:///C:/exactdirectory/...".
> Xerces/JDOM did not have a problem with the implicit reference above, but
> Crimson/JAXP/JDOM fails to find it and gives:
> Root cause: org.xml.sax.SAXParseException: Relative URI
> "007_sync_customer_005.dtd"; can not
> be resolved without a document URI.
>         at java.lang.Throwable.<init>(Throwable.java:96)
>         at java.lang.Exception.<init>(Exception.java:44)
>         at org.xml.sax.SAXException.<init>(SAXException.java:78)
>         at org.xml.sax.SAXParseException.<init>(SAXParseException.java:84)
>         at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3035)
>         at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3029)
>         at
> org.apache.crimson.parser.Parser2.parseSystemId(Parser2.java:2627)
>         at
> org.apache.crimson.parser.Parser2.maybeExternalID(Parser2.java:2605)
>         at
> org.apache.crimson.parser.Parser2.maybeDoctypeDecl(Parser2.java:1116)
>      ..............................
> Do I have a misunderstanding of how this should work or is this one of the
> costs of the 50% smaller footprint?
> thanks,
> _______________________________________________
> 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