[kaffe] Re: [Classpathx-xml] Re: Unwanted SAXParseException
Ito Kazumitsu
kaz at maczuka.gcd.org
Fri Oct 24 17:07:01 PDT 2003
Hi,
To conclude the issue, I suggest the following patch.
bash-2.05b$ diff -u gnu/xml/aelfred2/SAXDriver.java.orig gnu/xml/aelfred2/SAXDriver.java
--- gnu/xml/aelfred2/SAXDriver.java.orig Sat Oct 18 19:51:10 2003
+++ gnu/xml/aelfred2/SAXDriver.java Sat Oct 25 08:41:10 2003
@@ -596,8 +596,6 @@
in.getSystemId ());
if (source == null)
source = in;
- else if (source.getSystemId () == null)
- source.setSystemId (in.getSystemId ());
}
startExternalEntity (name, source.getSystemId (), true);
return source;
@@ -638,8 +636,13 @@
boolean stackOnly)
throws SAXException
{
+ // The following warning was deleted because the application has the
+ // option of not setting systemId. Sun's JAXP or Xerces seems to
+ // ignore this case.
+ /*
if (systemId == null)
warn ("URI was not reported to parser for entity " + name);
+ */
if (!stackOnly) // spliced [dtd] needs startEntity
lexicalHandler.startEntity (name);
entityStack.push (systemId);
bash-2.05b$ diff -u gnu/xml/aelfred2/XmlParser.java.orig gnu/xml/aelfred2/XmlParser.java
--- gnu/xml/aelfred2/XmlParser.java.orig Sat Sep 13 22:43:30 2003
+++ gnu/xml/aelfred2/XmlParser.java Sat Oct 25 08:47:16 2003
@@ -3449,10 +3449,15 @@
// we might be using alternate IDs/encoding
systemId = source.getSystemId ();
+ // The following warning and setting systemId was deleted bcause
+ // the application has the option of not setting systemId
+ // provided that it has set the characte/byte stream.
+ /*
if (systemId == null) {
handler.warn ("missing system ID, using " + ids [1]);
systemId = ids [1];
}
+ */
} else {
// "[document]", or "[dtd]" via getExternalSubset()
scratch.setCharacterStream (reader);
More information about the kaffe
mailing list