SAXEventSink.java: Ignore XML entities in start/ end entity callbacks.

2005-05-25  Chris Burdess  <dog@gnu.org>

	* gnu/xml/dom/ls/SAXEventSink.java: Ignore XML entities in start/
	end entity callbacks.

From-SVN: r100163
This commit is contained in:
Chris Burdess
2005-05-25 20:23:01 +00:00
committed by Tom Tromey
parent 9f938de17c
commit 24597146d4
2 changed files with 22 additions and 0 deletions
+17
View File
@@ -366,6 +366,14 @@ class SAXEventSink
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 @@ class SAXEventSink
// 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)