xml-xalan-j-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marco <brbr...@tin.it>
Subject Processing xml without dtd
Date Fri, 14 May 2004 14:57:00 GMT
Is it possible to process xml files with unreachable (or unavailable) DTDs?
Even using a non-validating sax parser as source, xalan still throws
the

javax.xml.transform.TransformerException: java.io.FileNotFoundException: 
office.dtd

where office.dtd is the input file dtd.
Here's the source:

SAXParserFactory spf = SAXParserFactory.newInstance();
spf.setValidating(false);
spf.setNamespaceAware(true);
XMLReader xmlr = spf.newSAXParser().getXMLReader();
TransformerFactory tf = TransformerFactory.newInstance();
Transformer t = tf.newTransformer(new StreamSource("notes.xsl"));
t.transform(new SAXSource(xmlr, new InputSource("content.xml")), new 
StreamResult("output.html"));

Thanks in advance,
Marco


Mime
View raw message