mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-07-29 11:41:22 +03:00
fixed 2 bugs pointed in #116448 Daniel
* debugXML.c xpath.c: fixed 2 bugs pointed in #116448 Daniel
This commit is contained in:
@ -1,3 +1,7 @@
|
|||||||
|
Sun Jul 6 19:56:18 CEST 2003 Daniel Veillard <daniel@veillard.com>
|
||||||
|
|
||||||
|
* debugXML.c xpath.c: fixed 2 bugs pointed in #116448
|
||||||
|
|
||||||
Sun Jul 6 19:34:17 CEST 2003 Daniel Veillard <daniel@veillard.com>
|
Sun Jul 6 19:34:17 CEST 2003 Daniel Veillard <daniel@veillard.com>
|
||||||
|
|
||||||
* xinclude.c: fixed bug #116095 removing the error message when
|
* xinclude.c: fixed bug #116095 removing the error message when
|
||||||
|
@ -2104,7 +2104,7 @@ xmlShell(xmlDocPtr doc, char *filename, xmlShellReadlineFunc input,
|
|||||||
while (1) {
|
while (1) {
|
||||||
if (ctxt->node == (xmlNodePtr) ctxt->doc)
|
if (ctxt->node == (xmlNodePtr) ctxt->doc)
|
||||||
snprintf(prompt, sizeof(prompt), "%s > ", "/");
|
snprintf(prompt, sizeof(prompt), "%s > ", "/");
|
||||||
else if (ctxt->node->name)
|
else if ((ctxt->node != NULL) && (ctxt->node->name))
|
||||||
snprintf(prompt, sizeof(prompt), "%s > ", ctxt->node->name);
|
snprintf(prompt, sizeof(prompt), "%s > ", ctxt->node->name);
|
||||||
else
|
else
|
||||||
snprintf(prompt, sizeof(prompt), "? > ");
|
snprintf(prompt, sizeof(prompt), "? > ");
|
||||||
@ -2329,6 +2329,13 @@ xmlShell(xmlDocPtr doc, char *filename, xmlShellReadlineFunc input,
|
|||||||
if (list->nodesetval != NULL) {
|
if (list->nodesetval != NULL) {
|
||||||
if (list->nodesetval->nodeNr == 1) {
|
if (list->nodesetval->nodeNr == 1) {
|
||||||
ctxt->node = list->nodesetval->nodeTab[0];
|
ctxt->node = list->nodesetval->nodeTab[0];
|
||||||
|
if ((ctxt->node != NULL) &&
|
||||||
|
(ctxt->node->type ==
|
||||||
|
XML_NAMESPACE_DECL)) {
|
||||||
|
xmlGenericError(xmlGenericErrorContext,
|
||||||
|
"cannot cd to namespace\n");
|
||||||
|
ctxt->node = NULL;
|
||||||
|
}
|
||||||
} else
|
} else
|
||||||
xmlGenericError(xmlGenericErrorContext,
|
xmlGenericError(xmlGenericErrorContext,
|
||||||
"%s is a %d Node Set\n",
|
"%s is a %d Node Set\n",
|
||||||
|
2
xpath.c
2
xpath.c
@ -5942,6 +5942,8 @@ xmlXPathGetElementsByIds (xmlDocPtr doc, const xmlChar *ids) {
|
|||||||
xmlAttrPtr attr;
|
xmlAttrPtr attr;
|
||||||
xmlNodePtr elem = NULL;
|
xmlNodePtr elem = NULL;
|
||||||
|
|
||||||
|
if (ids == NULL) return(NULL);
|
||||||
|
|
||||||
ret = xmlXPathNodeSetCreate(NULL);
|
ret = xmlXPathNodeSetCreate(NULL);
|
||||||
|
|
||||||
while (IS_BLANK(*cur)) cur++;
|
while (IS_BLANK(*cur)) cur++;
|
||||||
|
Reference in New Issue
Block a user