Commit 455472f2 authored by Kasimier T. Buchcik's avatar Kasimier T. Buchcik

Fixed a test for duplicate attributes: Non-prefixed attributes were

* parser.c: Fixed a test for duplicate attributes: Non-prefixed
  attributes were treated as being bound to the default namespace.
parent 64dc4d2c
Fri Apr 29 11:27:37 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
* parser.c: Fixed a test for duplicate attributes: Non-prefixed
attributes were treated as being bound to the default namespace.
Tue Apr 19 17:51:32 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
* xmlschemastypes.c: Fixed date-time related validation
......
......@@ -7787,13 +7787,19 @@ failed:
* The attributes checkings
*/
for (i = 0; i < nbatts;i += 5) {
nsname = xmlGetNamespace(ctxt, atts[i + 1]);
if ((atts[i + 1] != NULL) && (nsname == NULL)) {
xmlNsErr(ctxt, XML_NS_ERR_UNDEFINED_NAMESPACE,
"Namespace prefix %s for %s on %s is not defined\n",
atts[i + 1], atts[i], localname);
}
atts[i + 2] = nsname;
/*
* The default namespace does not apply to attribute names.
*/
if (atts[i + 1] != NULL) {
nsname = xmlGetNamespace(ctxt, atts[i + 1]);
if (nsname == NULL) {
xmlNsErr(ctxt, XML_NS_ERR_UNDEFINED_NAMESPACE,
"Namespace prefix %s for %s on %s is not defined\n",
atts[i + 1], atts[i], localname);
}
atts[i + 2] = nsname;
} else
nsname = NULL;
/*
* [ WFC: Unique Att Spec ]
* No attribute name may appear more than once in the same
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment