mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-07-29 11:41:22 +03:00
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
This commit is contained in:
@ -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
|
||||
|
11
xpath.c
11
xpath.c
@ -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));
|
||||
}
|
||||
|
Reference in New Issue
Block a user