classpathx-xml
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Classpathx-xml] Re: Unwanted SAXParseException


From: Ito Kazumitsu
Subject: Re: [Classpathx-xml] Re: Unwanted SAXParseException
Date: Sat, 25 Oct 2003 08:57:05 +0900
User-agent: EMH/1.10.0 SEMI/1.13.7 (Awazu) FLIM/1.13.2 (Kasanui) Emacs/21.2 (i386-unknown-freebsd4.7) MULE/5.0 (SAKAKI)

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);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]