mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-07-29 11:41:22 +03:00
- xpath.c: a bug reported by Stephan Kulow empty nodesets
were not equal to empty strings Daniel
This commit is contained in:
@ -1,3 +1,8 @@
|
||||
Thu Jul 5 22:01:31 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
|
||||
|
||||
* xpath.c: a bug reported by Stephan Kulow empty nodesets
|
||||
were not equal to empty strings
|
||||
|
||||
Thu Jul 5 00:52:25 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
|
||||
|
||||
* SAX.c: fixed a URI-Reference computation problem when validating
|
||||
|
11
xpath.c
11
xpath.c
@ -1904,7 +1904,7 @@ xmlXPathRegisterVariableLookup(xmlXPathContextPtr ctxt,
|
||||
* Search in the Variable array of the context for the given
|
||||
* variable value.
|
||||
*
|
||||
* Returns the value or NULL if not found
|
||||
* Returns a copy of the value or NULL if not found
|
||||
*/
|
||||
xmlXPathObjectPtr
|
||||
xmlXPathVariableLookup(xmlXPathContextPtr ctxt, const xmlChar *name) {
|
||||
@ -1930,7 +1930,7 @@ xmlXPathVariableLookup(xmlXPathContextPtr ctxt, const xmlChar *name) {
|
||||
* Search in the Variable array of the context for the given
|
||||
* variable value.
|
||||
*
|
||||
* Returns the value or NULL if not found
|
||||
* Returns the a copy of the value or NULL if not found
|
||||
*/
|
||||
xmlXPathObjectPtr
|
||||
xmlXPathVariableLookupNS(xmlXPathContextPtr ctxt, const xmlChar *name,
|
||||
@ -3327,8 +3327,11 @@ xmlXPathEqualNodeSetString(xmlXPathObjectPtr arg, const xmlChar * str)
|
||||
hash = xmlXPathStringHash(str);
|
||||
if (ns == NULL)
|
||||
return (0);
|
||||
if (ns->nodeNr <= 0)
|
||||
return (0);
|
||||
if (ns->nodeNr <= 0) {
|
||||
if (hash == 0)
|
||||
return(1);
|
||||
return(0);
|
||||
}
|
||||
for (i = 0; i < ns->nodeNr; i++) {
|
||||
if (xmlXPathNodeValHash(ns->nodeTab[i]) == hash) {
|
||||
str2 = xmlNodeGetContent(ns->nodeTab[i]);
|
||||
|
Reference in New Issue
Block a user