aboutsummaryrefslogtreecommitdiff
path: root/libjava/gnu
diff options
context:
space:
mode:
authorChris Burdess <dog@bluezoo.org>2005-03-10 19:44:22 +0000
committerTom Tromey <tromey@gcc.gnu.org>2005-03-10 19:44:22 +0000
commitb6d27f19fd05f70682bd8362f368a458f8618cad (patch)
tree6bf096ad9f53088fca03ada11a7f70f4e24de4e1 /libjava/gnu
parent18744d9b72b028b5612e250966f9d165a40ae9d8 (diff)
downloadgcc-b6d27f19fd05f70682bd8362f368a458f8618cad.zip
gcc-b6d27f19fd05f70682bd8362f368a458f8618cad.tar.gz
gcc-b6d27f19fd05f70682bd8362f368a458f8618cad.tar.bz2
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
Diffstat (limited to 'libjava/gnu')
-rw-r--r--libjava/gnu/xml/dom/ls/SAXEventSink.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/libjava/gnu/xml/dom/ls/SAXEventSink.java b/libjava/gnu/xml/dom/ls/SAXEventSink.java
index 24f6ccc..60b99d4 100644
--- a/libjava/gnu/xml/dom/ls/SAXEventSink.java
+++ b/libjava/gnu/xml/dom/ls/SAXEventSink.java
@@ -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);
}