diff --git a/ChangeLog b/ChangeLog index 6df99de8..216f0c20 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Wed Aug 1 17:44:57 CEST 2001 Daniel Veillard + + * xpath.c: fixed a bug when walking the descendants and + the current node has no children + * debugXML.c: show up when a text node is supposed to not be escaped + Wed Aug 1 01:33:35 CEST 2001 Thomas Broyer * xpath.c: fixed a bug in xmlXPathNodeTrailingSorted (for now it diff --git a/debugXML.c b/debugXML.c index 30565488..ddf9657c 100644 --- a/debugXML.c +++ b/debugXML.c @@ -20,15 +20,13 @@ #include #include #include +#include #include #include #include #include #include -#define IS_BLANK(c) \ - (((c) == '\n') || ((c) == '\r') || ((c) == '\t') || ((c) == ' ')) - /** * xmlDebugDumpString: * @output: the FILE * for the output @@ -569,7 +567,10 @@ xmlDebugDumpOneNode(FILE * output, xmlNodePtr node, int depth) break; case XML_TEXT_NODE: fprintf(output, shift); - fprintf(output, "TEXT\n"); + if (node->name == xmlStringTextNoenc) + fprintf(output, "TEXT no enc\n"); + else + fprintf(output, "TEXT\n"); break; case XML_CDATA_SECTION_NODE: fprintf(output, shift); diff --git a/xpath.c b/xpath.c index 51899ea3..1c8c1a85 100644 --- a/xpath.c +++ b/xpath.c @@ -4607,11 +4607,13 @@ xmlXPathNextDescendant(xmlXPathParserContextPtr ctxt, xmlNodePtr cur) { return(ctxt->context->node->children); } - if (cur->children != NULL) - { + if (cur->children != NULL) { if (cur->children->type != XML_ENTITY_DECL) - return(cur->children); - } + return(cur->children); + } + + if (cur == ctxt->context->node) return(NULL); + if (cur->next != NULL) return(cur->next); do {