1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-07-30 22:43:14 +03:00

fixed bug #118712 about mixed content, and namespaced element names. added

* valid.c: fixed bug #118712 about mixed content, and namespaced
  element names.
* test/valid/mixed_ns.xml result/valid/mixed_ns*: added a check
  in the regression tests
Daniel
This commit is contained in:
Daniel Veillard
2003-08-03 22:58:54 +00:00
parent 779af00750
commit 7b68df974b
8 changed files with 65 additions and 10 deletions

28
valid.c
View File

@ -3717,20 +3717,34 @@ xmlValidateElementDecl(xmlValidCtxtPtr ctxt, xmlDocPtr doc,
next = cur->c2;
while (next != NULL) {
if (next->type == XML_ELEMENT_CONTENT_ELEMENT) {
if (xmlStrEqual(next->name, name)) {
VERROR(ctxt->userData,
if ((xmlStrEqual(next->name, name)) &&
(xmlStrEqual(next->prefix, cur->prefix))) {
if (cur->prefix == NULL) {
VERROR(ctxt->userData,
"Definition of %s has duplicate references of %s\n",
elem->name, name);
elem->name, name);
} else {
VERROR(ctxt->userData,
"Definition of %s has duplicate references of %s:%s\n",
elem->name, cur->prefix, name);
}
ret = 0;
}
break;
}
if (next->c1 == NULL) break;
if (next->c1->type != XML_ELEMENT_CONTENT_ELEMENT) break;
if (xmlStrEqual(next->c1->name, name)) {
VERROR(ctxt->userData,
"Definition of %s has duplicate references of %s\n",
elem->name, name);
if ((xmlStrEqual(next->c1->name, name)) &&
(xmlStrEqual(next->c1->prefix, cur->prefix))) {
if (cur->prefix == NULL) {
VERROR(ctxt->userData,
"Definition of %s has duplicate references to %s\n",
elem->name, name);
} else {
VERROR(ctxt->userData,
"Definition of %s has duplicate references to %s:%s\n",
elem->name, cur->prefix, name);
}
ret = 0;
}
next = next->c2;