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);
|
||||
#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);
|
||||
goto out_object;
|
||||
xmlXPathFreeObject(resObj);
|
||||
resObj = NULL;
|
||||
}
|
||||
|
||||
valuePush(ctxt, resObj);
|
||||
xmlFree(fragment);
|
||||
return;
|
||||
|
||||
out_object:
|
||||
xmlXPathFreeObject(resObj);
|
||||
|
||||
out_fragment:
|
||||
valuePush(ctxt, xmlXPathNewNodeSet(NULL));
|
||||
if (resObj == NULL)
|
||||
resObj = xmlXPathNewNodeSet(NULL);
|
||||
valuePush(ctxt, resObj);
|
||||
xmlFree(fragment);
|
||||
}
|
||||
|
||||
|
@ -491,9 +491,6 @@ libxml_xmlXPathObjectPtrWrap(xmlXPathObjectPtr obj)
|
||||
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);
|
||||
|
Reference in New Issue
Block a user