Patch: FYI: XML fixlet from Classpath
Tom Tromey
tromey@redhat.com
Wed May 25 22:15:00 GMT 2005
I'm checking this in on the trunk and the 4.0 branch.
This is a fix from Classpath for a buglet in SAXEventSink. We were
tripping across this with Eclipse, see this PR:
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=158614
Tom
Index: ChangeLog
from Chris Burdess <dog@gnu.org>
* gnu/xml/dom/ls/SAXEventSink.java: Ignore XML entities in start/
end entity callbacks.
Index: gnu/xml/dom/ls/SAXEventSink.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/gnu/xml/dom/ls/SAXEventSink.java,v
retrieving revision 1.1.14.1
diff -u -r1.1.14.1 SAXEventSink.java
--- gnu/xml/dom/ls/SAXEventSink.java 10 Mar 2005 19:42:47 -0000 1.1.14.1
+++ gnu/xml/dom/ls/SAXEventSink.java 25 May 2005 20:06:26 -0000
@@ -366,6 +366,14 @@
ctx = doctype;
return;
}
+ if ("lt".equals(name) ||
+ "gt".equals(name) ||
+ "amp".equals(name) ||
+ "apos".equals(name) ||
+ "quot".equals(name))
+ {
+ return;
+ }
// Get entity
NamedNodeMap entities = doctype.getEntities();
Entity entity = (Entity) entities.getNamedItem(name);
@@ -385,6 +393,15 @@
// Ignore DTD and parameter entities
return;
}
+ if ("lt".equals(name) ||
+ "gt".equals(name) ||
+ "amp".equals(name) ||
+ "apos".equals(name) ||
+ "quot".equals(name))
+ {
+ return;
+ }
+ // Get entity
Entity entity = popEntity();
// TODO resolve external entities to ensure that entity has content
if (expandEntityReferences)
More information about the Java-patches
mailing list