]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
2005-03-10 Chris Burdess <dog@bluezoo.org>
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 10 Mar 2005 19:44:22 +0000 (19:44 +0000)
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 10 Mar 2005 19:44:22 +0000 (19:44 +0000)
* gnu/xml/dom/ls/SAXEventSink.java: Ignore element declarations if
not currently parsing the DTD.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@96255 138bc75d-0d04-0410-961f-82ee72b054a4

libjava/ChangeLog
libjava/gnu/xml/dom/ls/SAXEventSink.java

index b92bf687e695029ca0cff7685086ff0843f236de..4a68654f2635558186e60f5f3f12bd2e8a650b67 100644 (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.
index 24f6cccf5b852a735fdcc06772efa4e61c61994e..60b99d49305474a999ec365dc2c7b1c10408c9a1 100644 (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);
   }