classpathx-xml
[Top][All Lists]
Advanced

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

Re: Bug report (Re: [Classpathx-xml] Merging GNU JAXP into kaffe)


From: David Brownell
Subject: Re: Bug report (Re: [Classpathx-xml] Merging GNU JAXP into kaffe)
Date: Thu, 05 Dec 2002 08:04:03 -0800
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9) Gecko/20020513

Dalibor Topic wrote:

In short: the bug is that currently GNU JAXP parses an
attribute when it shouldn't. The bug is in
gnu/xml/pipeline/EventFilter.java . It has been
introduced in version 1.14 of the file.

No, that code is right ... did you have a chance
yet to try that patch I sent?  The problem would be
that there's one use of that bind() call in a place
where its potential side effect shouldn't be visible;
the fix is to prevent that.

Of course I think the root cause is a default in
SAX2 that hides important infoset data, but that's
unfixable.  Except by better layers on top of SAX,
like the gnu.xml.pipeline layer, being more faithful
to the xml infoset data model.  That's the issue
you noted with your workaround:  all those layered
things not working right when that data is missing.

- Dave


--- source/gnu/xml/aelfred2/XmlReader.java      10 Dec 2001 20:08:53 -0000      
1.8
+++ source/gnu/xml/aelfred2/XmlReader.java      4 Dec 2002 14:24:36 -0000
@@ -273,6 +273,7 @@
     throws SAXException, IOException
     {
        EventFilter     next;
+       boolean         nsdecls;
 
        synchronized (aelfred2) {
            if (active)
@@ -288,7 +289,14 @@
            next = filter;
 
        // connect pipeline and error handler
+       // don't let _this_ call to bind() affect xmlns* attributes
+       nsdecls = aelfred2.getFeature (
+           SAXDriver.FEATURE + "namespace-prefixes");
        EventFilter.bind (aelfred2, next);
+       if (!nsdecls)
+           aelfred2.setFeature (
+               SAXDriver.FEATURE + "namespace-prefixes",
+               true);
 
        // parse, clean up
        try {

reply via email to

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