[jdom-interest] Validation problem

Laurent Bihanic laurent.bihanic at atosorigin.com
Thu Nov 29 01:07:22 PST 2001


Wang Khong Hai wrote:

> Hi,
> 
> I am facing a problem with the DOCTYPE element type. Currently, I am using
> Xerces 1.4.3 with JDOM 7. When I am building a XML document with the DOCTYPE
> tag pointing to a SYSTEM DTD, I am having problem building the document
> because the DTD is not found. I am not going to do any validation, is there
> any way to turn off this feature to find the DTD when building the document
> or is there any way to build a documnet in this case? Any help is
> appreciated. Thank you.
> 

Hi,

No, there is no way to do that as the XML parser needs to load the DTD in case 
it defines entities that shall be resolved even when validation is not requested.

What you can do is register an org.xml.sax.EntityResolver implementation that 
returns a reference to a file stored locally.

Laurent




More information about the jdom-interest mailing list