mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-10-21 14:53:44 +03:00
fixing a number of issues raised by xml:id but more generally related to
* SAX2.c tree.c valid.c: fixing a number of issues raised by xml:id but more generally related to attributes and ID handling, fixes #314358 among other things Daniel
This commit is contained in:
6
valid.c
6
valid.c
@@ -2703,8 +2703,12 @@ xmlFreeIDTable(xmlIDTablePtr table) {
|
||||
*/
|
||||
int
|
||||
xmlIsID(xmlDocPtr doc, xmlNodePtr elem, xmlAttrPtr attr) {
|
||||
if ((attr == NULL) || (attr->name == NULL)) return(0);
|
||||
if ((attr->ns != NULL) && (attr->ns->prefix != NULL) &&
|
||||
(!strcmp((char *) attr->name, "id")) &&
|
||||
(!strcmp((char *) attr->ns->prefix, "xml")))
|
||||
return(1);
|
||||
if (doc == NULL) return(0);
|
||||
if (attr == NULL) return(0);
|
||||
if ((doc->intSubset == NULL) && (doc->extSubset == NULL)) {
|
||||
return(0);
|
||||
} else if (doc->type == XML_HTML_DOCUMENT_NODE) {
|
||||
|
Reference in New Issue
Block a user