Re: Bug report (Re: Merging GNU JAXP into kaffe)
David Brownell <[email protected]>
| Newsgroups | gmane.comp.java.classpath.extensions.xml |
|---|---|
| Message-ID | <[email protected]> |
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
patch
(text/plain, 692 B)
--- 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 {