Skip to content
Snippets Groups Projects
Commit 564229366f81 authored by Nick Wellnhofer's avatar Nick Wellnhofer
Browse files

Remove case labels with XPointer location types

parent 068dd813f30d
No related branches found
No related tags found
No related merge requests found
......@@ -187,21 +187,7 @@
xmlXPathFreeContext(xptrctxt);
#endif /* LIBXML_XPTR_ENABLED */
if (resObj == NULL)
goto out_fragment;
switch (resObj->type) {
case XPATH_NODESET:
break;
case XPATH_UNDEFINED:
case XPATH_BOOLEAN:
case XPATH_NUMBER:
case XPATH_STRING:
case XPATH_POINT:
case XPATH_USERS:
case XPATH_XSLT_TREE:
case XPATH_RANGE:
case XPATH_LOCATIONSET:
if ((resObj != NULL) && (resObj->type != XPATH_NODESET)) {
xsltTransformError(tctxt, NULL, NULL,
"document() : XPointer does not select a node set: #%s\n",
fragment);
......@@ -205,6 +191,7 @@
xsltTransformError(tctxt, NULL, NULL,
"document() : XPointer does not select a node set: #%s\n",
fragment);
goto out_object;
xmlXPathFreeObject(resObj);
resObj = NULL;
}
......@@ -209,4 +196,7 @@
}
out_fragment:
if (resObj == NULL)
resObj = xmlXPathNewNodeSet(NULL);
valuePush(ctxt, resObj);
xmlFree(fragment);
......@@ -211,13 +201,5 @@
valuePush(ctxt, resObj);
xmlFree(fragment);
return;
out_object:
xmlXPathFreeObject(resObj);
out_fragment:
valuePush(ctxt, xmlXPathNewNodeSet(NULL));
xmlFree(fragment);
}
/**
......
......@@ -491,9 +491,6 @@
case XPATH_STRING:
ret = PY_IMPORT_STRING((char *) obj->stringval);
break;
case XPATH_POINT:
case XPATH_RANGE:
case XPATH_LOCATIONSET:
default:
#ifdef DEBUG
printf("Unable to convert XPath object type %d\n", obj->type);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment