Commit 73c9c049 authored by Daniel Veillard's avatar Daniel Veillard

- xpath.c: a bug reported by Stephan Kulow empty nodesets

  were not equal to empty strings
Daniel
parent 234547b5
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
......
......@@ -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) {
......@@ -1928,9 +1928,9 @@ xmlXPathVariableLookup(xmlXPathContextPtr ctxt, const xmlChar *name) {
* @ns_uri: the variable namespace URI
*
* Search in the Variable array of the context for the given
* variable value.
* 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]);
......
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