[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Subject: DOCBOOK-APPS: Recursive Reference in XML DTD ??
Hi, I am having a problem which I describe in detail below, after seeing the traffic over the last day or so I guess this question is more appropriate on this mailing list than on the xerces-j list. Any help anyone could give me would be greatly appreciated. I am using: JDK for Linux (build 1.3.0beta_refresh-b09) xerces-j v1.2.0 The XML file that is causing problems is listed below. It references the public DocBook DTD, which I have not listed here, but is accessible in the location shown below. The java code I am running is shown below also. The class shown compiles fine. I run it with the command: $ java SAXWriter ../xml/simplefruitbowl.xml The out put I get is as follows: $ java SAXWriter ../xml/simplefruitbowl.xml Parsing file: ../xml/simplefruitbowl.xml ... Parse error: Recursive reference "%dbnotn;". (Reference path: (top-level)-%dbhier;-%dbnotn;-%dbnotn;) Done I took a look at the DTD, and the files it includes, and I cant work out why it thinks there is a recursive reference? Is this a bug with the parser? Or am I using it incorrectly? Thanks in advance. Stuart ++++++++++++++++++++++++++++++++++++++++++++++++++ Java Source File ++++++++++++++++++++++++++++++++++++++++++++++++++ import org.xml.sax.XMLReader; import org.xml.sax.SAXException; import org.apache.xerces.parsers.SAXParser; import java.io.IOException; public class SAXWriter { public static void main(String argv[]) { if (argv.length != 1) { System.err.println("Usage: java SAXWriter [filename]"); System.exit(1); } else { String fileName = argv[0]; String fileURI = fileName; SAXWriter writer = new SAXWriter(fileURI); } return; } public SAXWriter(String fileURI) { XMLReader parser = new org.apache.xerces.parsers.SAXParser(); System.out.println("Parsing file: " + fileURI + " ..."); try { parser.parse(fileURI); } catch (IOException e) { System.err.println("File error: " + e.getMessage()); } catch (SAXException e) { System.err.println("Parse error: " + e.getMessage()); } System.out.println("Done"); } } ++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++ XML File ++++++++++++++++++++++++++++++++++++++++++++++++++ <?xml version="1.0" standalone="no" ?> <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook V4.1.2//EN" "http://www.docbook.org/xml/4.1.2/docbookx.dtd"> <article> <section label="summary"> <para>A wooden fruit bowl made in CDT</para> </section> </article> ++++++++++++++++++++++++++++++++++++++++++++++++++
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC