transform xml with unreachable dtd 2003-05-08 - By Andrew Welch
Hi,
I am trying to transform an xml file with a doctype that references a dtd that wont be available at the point of transform. Is it possible to still transform the xml?
<?xml version="1.0" ?> <!DOCTYPE foo SYSTEM "ini.dtd"> <foo> </foo>
Currently I get the error:
java.io.FileNotFoundException: T:\omi transform\ini.dtd (The system cannot find the file specified) java.io.FileNotFoundException: T:\omi transform\ini.dtd (The system cannot find the file specified) at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3182) at org.apache.crimson.parser.Parser2.externalParameterEntity(Parser2 .java:2870) at org.apache.crimson.parser.Parser2.maybeDoctypeDecl(Parser2.java:1167) ....
I have tried using
xf.setFeature("http://xml.org/sax/features/external-parameter-entities",false);
where xf is the XMLFilter, but crimson doesnt support this feature. After reading around Ive kind of got the impression that the DTD must be available if it is specified otherwise the transform should fail (as the xml needs it resolve entities etc).
How can I get the xml to parse without the dtd being available?
cheers andrew
--- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.470 / Virus Database: 268 - Release Date: 08/04/2003
|
|