[jdom-interest] Turning off DTD validation within JDOMSource
Gary Lawrence Murphy
garym at canada.com
Thu Apr 11 13:09:06 PDT 2002
>>>>> "G" == Gary Lawrence Murphy <garym at canada.com> writes:
G> Transformer xslt = TransformerFactory.newInstance()
G> .newTransformer(new StreamSource(xsl)); xslt.transform(new
G> JDOMSource(dom), newdom);
G> Is there some way to tell the JDOMSource (or the
G> TransformerImpl) that it should ignore the DTD?
According to the API docs, the following should work, but it doesn't:
JDOMSource jds = new JDOMSource(dom);
jds.getXMLReader().setFeature(
"http://xml.org/sax/features/validation",
false); // ignore DTD
What is the correct way to do this?
--
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