diff options
author | Daniel Veillard <veillard@src.gnome.org> | 2001-04-30 20:31:33 +0000 |
---|---|---|
committer | Daniel Veillard <veillard@src.gnome.org> | 2001-04-30 20:31:33 +0000 |
commit | c8f620ba7f95b3ceb687699e140eeaa33343e41a (patch) | |
tree | 4c2e6e8edf4d7c0cf1d948d2caf4884b7ad76c82 | |
parent | 5792e16f0562d206e1ef4e611f7b43ec53c92149 (diff) | |
download | libxml2-c8f620ba7f95b3ceb687699e140eeaa33343e41a.tar.gz |
fix of an XSLT namespace bug reported on the list general/bug-8- Daniel
* xpath.c: fix of an XSLT namespace bug reported on the list general/bug-8-
Daniel
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | xpath.c | 11 |
2 files changed, 14 insertions, 2 deletions
@@ -1,3 +1,8 @@ +Mon Apr 30 22:29:34 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr> + + * xpath.c: fix of an XSLT namespace bug reported on the list + general/bug-8- + Mon Apr 30 19:42:58 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr> * strio.h trio.c: Dan McNichol suggested a couple of small @@ -1966,8 +1966,15 @@ xmlXPathNsLookup(xmlXPathContextPtr ctxt, const xmlChar *prefix) { return(XML_XML_NAMESPACE); #endif - if (ctxt->nsHash == NULL) - return(NULL); + if (ctxt->namespaces != NULL) { + int i; + + for (i = 0;i < ctxt->nsNr;i++) { + if ((ctxt->namespaces[i] != NULL) && + (xmlStrEqual(ctxt->namespaces[i]->prefix, prefix))) + return(ctxt->namespaces[i]->href); + } + } return((const xmlChar *) xmlHashLookup(ctxt->nsHash, prefix)); } |