diff options
author | Daniel Veillard <veillard@src.gnome.org> | 2005-09-03 13:28:24 +0000 |
---|---|---|
committer | Daniel Veillard <veillard@src.gnome.org> | 2005-09-03 13:28:24 +0000 |
commit | 54f9a4f5089a974cd773ab285637ea21df01202c (patch) | |
tree | 50849b1498c207ab60cc571d219cd72a12057365 /valid.c | |
parent | 2e7598cb06cdb5ae30275dacf40a09c6e26d62fe (diff) | |
download | libxml2-54f9a4f5089a974cd773ab285637ea21df01202c.tar.gz |
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
Diffstat (limited to 'valid.c')
-rw-r--r-- | valid.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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) { |