You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by Stuart Farnan <st...@neoworks.com> on 2000/09/27 14:14:58 UTC
RE: DOCBOOK-APPS: Recursive Reference in XML DTD ??
Andi,
Thanks a lot for the help, have tried v1.1.3 of xerces and the problem seems
to go away. I guess that means its a bug in v1.2.0.
Not sure if this is a registered bug, but if not, the details are listed
below.
Thanks guys,
Stuart
-----Original Message-----
From: Bács Andrea [mailto:andi@cardinal.hu]
Sent: 27 September 2000 08:59
To: 'Stuart Farnan'
Subject: RE: DOCBOOK-APPS: Recursive Reference in XML DTD ??
Hi,
I had the same problem on Windows platform. It took me some days to
solve
it. Try to use an older (or the newest version if corrected the error)
version of xerces, for example xerces v1.1.3. This version didn't give me
this error. It seems to me a problem with xerces.
Andi
-----Original Message-----
From: Stuart Farnan [mailto:stuart@neoworks.com]
Sent: Tuesday, September 26, 2000 11:48 AM
To: docbook-apps@lists.oasis-open.org
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>
++++++++++++++++++++++++++++++++++++++++++++++++++