mirror of
https://gitlab.gnome.org/GNOME/libxslt
synced 2025-07-29 15:41:13 +03:00
Remove case labels with XPointer location types
This commit is contained in:
@ -187,36 +187,18 @@ xsltDocumentFunctionLoadDocument(xmlXPathParserContextPtr ctxt, xmlChar* URI)
|
|||||||
xmlXPathFreeContext(xptrctxt);
|
xmlXPathFreeContext(xptrctxt);
|
||||||
#endif /* LIBXML_XPTR_ENABLED */
|
#endif /* LIBXML_XPTR_ENABLED */
|
||||||
|
|
||||||
if (resObj == NULL)
|
if ((resObj != NULL) && (resObj->type != XPATH_NODESET)) {
|
||||||
goto out_fragment;
|
xsltTransformError(tctxt, NULL, NULL,
|
||||||
|
"document() : XPointer does not select a node set: #%s\n",
|
||||||
switch (resObj->type) {
|
fragment);
|
||||||
case XPATH_NODESET:
|
xmlXPathFreeObject(resObj);
|
||||||
break;
|
resObj = NULL;
|
||||||
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:
|
|
||||||
xsltTransformError(tctxt, NULL, NULL,
|
|
||||||
"document() : XPointer does not select a node set: #%s\n",
|
|
||||||
fragment);
|
|
||||||
goto out_object;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
valuePush(ctxt, resObj);
|
|
||||||
xmlFree(fragment);
|
|
||||||
return;
|
|
||||||
|
|
||||||
out_object:
|
|
||||||
xmlXPathFreeObject(resObj);
|
|
||||||
|
|
||||||
out_fragment:
|
out_fragment:
|
||||||
valuePush(ctxt, xmlXPathNewNodeSet(NULL));
|
if (resObj == NULL)
|
||||||
|
resObj = xmlXPathNewNodeSet(NULL);
|
||||||
|
valuePush(ctxt, resObj);
|
||||||
xmlFree(fragment);
|
xmlFree(fragment);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -491,9 +491,6 @@ libxml_xmlXPathObjectPtrWrap(xmlXPathObjectPtr obj)
|
|||||||
case XPATH_STRING:
|
case XPATH_STRING:
|
||||||
ret = PY_IMPORT_STRING((char *) obj->stringval);
|
ret = PY_IMPORT_STRING((char *) obj->stringval);
|
||||||
break;
|
break;
|
||||||
case XPATH_POINT:
|
|
||||||
case XPATH_RANGE:
|
|
||||||
case XPATH_LOCATIONSET:
|
|
||||||
default:
|
default:
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
printf("Unable to convert XPath object type %d\n", obj->type);
|
printf("Unable to convert XPath object type %d\n", obj->type);
|
||||||
|
Reference in New Issue
Block a user