the a-posteriori DTD validation code was not validating the namespace
* valid.c: the a-posteriori DTD validation code was not validating
the namespace declarations, this fixes #124110
Daniel
diff --git a/ChangeLog b/ChangeLog
index 44d9e62..b6dcfd2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Thu Oct 30 11:14:31 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * valid.c: the a-posteriori DTD validation code was not validating
+ the namespace declarations, this fixes #124110
+
Wed Oct 29 14:13:03 PDT 2003 William Brack <wbrack@mmm.com.hk>
* xmlIO.c: enhanced to bypass compression detection code
diff --git a/valid.c b/valid.c
index 4853cc7..d2eea46 100644
--- a/valid.c
+++ b/valid.c
@@ -6038,6 +6038,7 @@
xmlValidateElement(xmlValidCtxtPtr ctxt, xmlDocPtr doc, xmlNodePtr elem) {
xmlNodePtr child;
xmlAttrPtr attr;
+ xmlNsPtr ns;
xmlChar *value;
int ret = 1;
@@ -6062,13 +6063,20 @@
ret &= xmlValidateOneElement(ctxt, doc, elem);
attr = elem->properties;
- while(attr != NULL) {
+ while (attr != NULL) {
value = xmlNodeListGetString(doc, attr->children, 0);
ret &= xmlValidateOneAttribute(ctxt, doc, elem, attr, value);
if (value != NULL)
xmlFree(value);
attr= attr->next;
}
+ ns = elem->nsDef;
+ while (ns != NULL) {
+ value = ns->href;
+ ret &= xmlValidateOneNamespace(ctxt, doc, elem, ns->prefix,
+ ns, ns->href);
+ ns = ns->next;
+ }
child = elem->children;
while (child != NULL) {
ret &= xmlValidateElement(ctxt, doc, child);