[jdom-interest] Issue: When the DTD is not available

Richard Monson-Haefel Richard at Monson-Haefel.com
Thu Dec 7 11:20:28 PST 2000

First: Congratulations to Brett McLaughlin, Jason Hunter and others on
the JDOM project for creating a an exceptional XML API.  It's very

<disclaimer> I don't claim to have expertise in XML so the issue I'm
about to bring up may not be an issue at all. <disclaimer>

I noticed that I get exceptions from the build operations of both the
SAXBuilder and DOMBuilder if the DTD is not physically available when
parsing the XML document.  This is understandable if I set validate=true
when constructing a builder, but doesn't seem logical if I set

The exceptions are generated by the underlying parsers, so there may not
be a solution, but it would be nice -- when validate is set to false --
if you could allow a file to be parsed without requiring the presence of
the DTD.

The "problem" occurs under the following conditions:

The DTD is public at some Internet address but the file is not there.
The DTD is public at some Internet address but the machine is not
The DTD is a system file, but its not in the same directory as the VM.



Richard Monson-Haefel
Author of Enterprise JavaBeans, 2nd Edition  (O'Reilly 2000)
Co-Author of Java Message Service (O'Reilly 2000)

More information about the jdom-interest mailing list