I think for proper operation we have to remove the various XML service
files from META-INF; see the earlier thread.  But in order for this to
work we also have to fix SAX to properly fall back to the Classpath
SAX parser.

This patch does this.  It is a divergence from upstream, but in a
place clearly marked -- both by us and by the SAX maintainers.

Let me know what you think.  I tried various combinations against the
Sun JDK and I think this combination (removing service files and
adding this patch) provides best compatibility.

I'll check this in soon-ish unless there are objections.

Tom

Index: ChangeLog
from  Tom Tromey  <[EMAIL PROTECTED]>

        PR classpath/31303:
        * external/sax/org/xml/sax/helpers/XMLReaderFactory.java
        (createXMLReader): Code in Classpath default.

Index: external/sax/org/xml/sax/helpers/XMLReaderFactory.java
===================================================================
--- external/sax/org/xml/sax/helpers/XMLReaderFactory.java      (revision 
123217)
+++ external/sax/org/xml/sax/helpers/XMLReaderFactory.java      (working copy)
@@ -137,6 +137,11 @@
        if (className == null) {
 // BEGIN DISTRIBUTION-SPECIFIC
 
+           // CLASSPATH LOCAL: have to code in the backup.
+           // Among other things, see PR 31303, and this thread:
+           // http://gcc.gnu.org/ml/java-patches/2007-q1/msg00661.html
+           className = "gnu.xml.stream.SAXParser";
+
            // EXAMPLE:
            // className = "com.example.sax.XmlReader";
            // or a $JAVA_HOME/jre/lib/*properties setting...

Reply via email to