[jdom-interest] Turning off DTD validation within JDOMSource

Gary Lawrence Murphy garym at canada.com
Thu Apr 11 12:31:44 PDT 2002

I have an application where the JDOM is loaded fine using

    SAXBuilder builder = new SAXBuilder(getSaxClass());

but when I try to apply a stylesheet to it, I am getting an error in
the following line to say it could not find the DTD, which is correct;
the DTDs are not available at this point in the process.

    Transformer xslt = TransformerFactory.newInstance()
        .newTransformer(new StreamSource(xsl));
    xslt.transform(new JDOMSource(dom), newdom);

Is there some way to tell the JDOMSource (or the TransformerImpl) that
it should ignore the DTD?

Gary Lawrence Murphy <garym at teledyn.com> TeleDynamics Communications Inc
Business Innovations Through Open Source Systems: http://www.teledyn.com
"Computers are useless.  They can only give you answers."(Pablo Picasso)

More information about the jdom-interest mailing list