1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-07-29 11:41:22 +03:00

More work and fixes on XPath:

- debugXML.c testXPath.c xpath.[ch]: More work on XPath/Xpointer,
  incorporated "(TOM)" <ptittom@free.fr> patches rebuilt the XPath
  examples with the extra test
Daniel
This commit is contained in:
Daniel Veillard
2000-10-04 13:33:43 +00:00
parent 7cfce324d8
commit ac26030669
18 changed files with 1226 additions and 121 deletions

View File

@ -584,6 +584,8 @@ void xmlDebugDumpOneNode(FILE *output, xmlNodePtr node, int depth) {
xmlDebugDumpAttrList(output, node->properties, depth + 1);
if (node->type != XML_ENTITY_REF_NODE) {
if (node->content != NULL) {
shift[2 * i] = shift[2 * i + 1] = ' ' ;
shift[2 * i + 2] = shift[2 * i + 3] = 0 ;
fprintf(output, shift);
fprintf(output, "content=");
#ifndef XML_USE_BUFFER_CONTENT
@ -1681,6 +1683,18 @@ xmlShell(xmlDocPtr doc, char *filename, xmlShellReadlineFunc input,
case XPATH_STRING:
fprintf(stderr, "%s is a string\n", arg);
break;
case XPATH_POINT:
fprintf(stderr, "%s is a point\n", arg);
break;
case XPATH_RANGE:
fprintf(stderr, "%s is a range\n", arg);
break;
case XPATH_LOCATIONSET:
fprintf(stderr, "%s is a range\n", arg);
break;
case XPATH_USERS:
fprintf(stderr, "%s is user-defined\n", arg);
break;
}
xmlXPathFreeNodeSetList(list);
} else {
@ -1719,6 +1733,18 @@ xmlShell(xmlDocPtr doc, char *filename, xmlShellReadlineFunc input,
case XPATH_STRING:
fprintf(stderr, "%s is a string\n", arg);
break;
case XPATH_POINT:
fprintf(stderr, "%s is a point\n", arg);
break;
case XPATH_RANGE:
fprintf(stderr, "%s is a range\n", arg);
break;
case XPATH_LOCATIONSET:
fprintf(stderr, "%s is a range\n", arg);
break;
case XPATH_USERS:
fprintf(stderr, "%s is user-defined\n", arg);
break;
}
xmlXPathFreeNodeSetList(list);
} else {
@ -1761,6 +1787,18 @@ xmlShell(xmlDocPtr doc, char *filename, xmlShellReadlineFunc input,
case XPATH_STRING:
fprintf(stderr, "%s is a string\n", arg);
break;
case XPATH_POINT:
fprintf(stderr, "%s is a point\n", arg);
break;
case XPATH_RANGE:
fprintf(stderr, "%s is a range\n", arg);
break;
case XPATH_LOCATIONSET:
fprintf(stderr, "%s is a range\n", arg);
break;
case XPATH_USERS:
fprintf(stderr, "%s is user-defined\n", arg);
break;
}
xmlXPathFreeNodeSetList(list);
} else {