SAXEventSink.java: Ignore element declarations if not currently parsing the DTD.

2005-03-10  Chris Burdess  <dog@bluezoo.org>

	* gnu/xml/dom/ls/SAXEventSink.java: Ignore element declarations if
	not currently parsing the DTD.

From-SVN: r96255
This commit is contained in:
Chris Burdess 2005-03-10 19:44:22 +00:00 committed by Tom Tromey
parent 18744d9b72
commit b6d27f19fd
2 changed files with 12 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2005-03-10 Chris Burdess <dog@bluezoo.org>
* gnu/xml/dom/ls/SAXEventSink.java: Ignore element declarations if
not currently parsing the DTD.
2005-03-10 Bryce McKinlay <mckinlay@redhat.com>
New Stack Trace infrastructure.

View File

@ -486,6 +486,13 @@ class SAXEventSink
{
return;
}
// Ignore fake element declarations generated by ValidationConsumer.
// If an element is not really declared in the DTD it will not be
// declared in the document model.
if (!(ctx instanceof DomDoctype))
{
return;
}
DomDoctype doctype = (DomDoctype) ctx;
doctype.elementDecl(name, model);
}