diff options
author | Daniel Veillard <veillard@src.gnome.org> | 2002-03-25 10:48:46 +0000 |
---|---|---|
committer | Daniel Veillard <veillard@src.gnome.org> | 2002-03-25 10:48:46 +0000 |
commit | d85f4f437c9d54a658b229a77426e693bd328787 (patch) | |
tree | abaa03453c1a644d131ef42e30e542598a633b30 /valid.c | |
parent | ac97f6e05657a569143811f6e92214faef9a150a (diff) | |
download | android_external_libxml2-d85f4f437c9d54a658b229a77426e693bd328787.tar.gz android_external_libxml2-d85f4f437c9d54a658b229a77426e693bd328787.tar.bz2 android_external_libxml2-d85f4f437c9d54a658b229a77426e693bd328787.zip |
fixed bug #76168, attribute redeclared in the internal subset should not
* valid.c SAX.c: fixed bug #76168, attribute redeclared in
the internal subset should not raise duplicate ID errors,
also there was a small bug in conjunction to namespace
declarations defaulted and xml:xxx attributes DTD definitions.
Daniel
Diffstat (limited to 'valid.c')
-rw-r--r-- | valid.c | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -1262,6 +1262,7 @@ xmlAddAttributeDecl(xmlValidCtxtPtr ctxt, xmlDtdPtr dtd, const xmlChar *elem, xmlFreeEnumeration(tree); return(NULL); } + /* * Check the type and possibly the default value. */ @@ -1301,6 +1302,18 @@ xmlAddAttributeDecl(xmlValidCtxtPtr ctxt, xmlDtdPtr dtd, const xmlChar *elem, } /* + * Check first that an attribute defined in the external subset wasn't + * already defined in the internal subset + */ + if ((dtd->doc != NULL) && (dtd->doc->extSubset == dtd) && + (dtd->doc->intSubset != NULL) && + (dtd->doc->intSubset->attributes != NULL)) { + ret = xmlHashLookup3(dtd->doc->intSubset->attributes, name, ns, elem); + if (ret != NULL) + return(NULL); + } + + /* * Create the Attribute table if needed. */ table = (xmlAttributeTablePtr) dtd->attributes; @@ -3369,6 +3382,9 @@ xmlValidateOneAttribute(xmlValidCtxtPtr ctxt, xmlDocPtr doc, if ((elem == NULL) || (elem->name == NULL)) return(0); if ((attr == NULL) || (attr->name == NULL)) return(0); + if (xmlStrEqual(attr->name, "lang")) { + printf("hello\n"); + } if ((elem->ns != NULL) && (elem->ns->prefix != NULL)) { xmlChar qname[500]; snprintf((char *) qname, sizeof(qname), "%s:%s", |