mirror of
https://github.com/reactos/reactos.git
synced 2025-07-31 12:02:02 +00:00
[LIBXML2] Update to version 2.10.0. CORE-17766
This commit is contained in:
parent
608bbe1136
commit
911153da10
80 changed files with 2351 additions and 20735 deletions
32
sdk/lib/3rdparty/libxml2/xpointer.c
vendored
32
sdk/lib/3rdparty/libxml2/xpointer.c
vendored
|
@ -132,6 +132,7 @@ xmlXPtrErr(xmlXPathParserContextPtr ctxt, int error,
|
|||
* A few helper functions for child sequences *
|
||||
* *
|
||||
************************************************************************/
|
||||
#ifdef LIBXML_XPTR_LOCS_ENABLED
|
||||
/* xmlXPtrAdvanceNode is a private function, but used by xinclude.c */
|
||||
xmlNodePtr xmlXPtrAdvanceNode(xmlNodePtr cur, int *level);
|
||||
/**
|
||||
|
@ -177,6 +178,7 @@ xmlXPtrGetIndex(xmlNodePtr cur) {
|
|||
}
|
||||
return(i);
|
||||
}
|
||||
#endif /* LIBXML_XPTR_LOCS_ENABLED */
|
||||
|
||||
/**
|
||||
* xmlXPtrGetNthChild:
|
||||
|
@ -205,6 +207,7 @@ xmlXPtrGetNthChild(xmlNodePtr cur, int no) {
|
|||
return(cur);
|
||||
}
|
||||
|
||||
#ifdef LIBXML_XPTR_LOCS_ENABLED
|
||||
/************************************************************************
|
||||
* *
|
||||
* Handling of XPointer specific types *
|
||||
|
@ -836,6 +839,7 @@ xmlXPtrWrapLocationSet(xmlLocationSetPtr val) {
|
|||
ret->user = (void *) val;
|
||||
return(ret);
|
||||
}
|
||||
#endif /* LIBXML_XPTR_LOCS_ENABLED */
|
||||
|
||||
/************************************************************************
|
||||
* *
|
||||
|
@ -996,7 +1000,8 @@ xmlXPtrEvalXPtrPart(xmlXPathParserContextPtr ctxt, xmlChar *name) {
|
|||
XP_ERROR(XPTR_SYNTAX_ERROR);
|
||||
}
|
||||
|
||||
if (xmlStrEqual(name, (xmlChar *) "xpointer")) {
|
||||
if (xmlStrEqual(name, (xmlChar *) "xpointer") ||
|
||||
xmlStrEqual(name, (xmlChar *) "xpath1")) {
|
||||
const xmlChar *oldBase = ctxt->base;
|
||||
const xmlChar *oldCur = ctxt->cur;
|
||||
|
||||
|
@ -1010,6 +1015,9 @@ xmlXPtrEvalXPtrPart(xmlXPathParserContextPtr ctxt, xmlChar *name) {
|
|||
ctxt->context->node = (xmlNodePtr)ctxt->context->doc;
|
||||
ctxt->context->proximityPosition = 1;
|
||||
ctxt->context->contextSize = 1;
|
||||
#ifdef LIBXML_XPTR_LOCS_ENABLED
|
||||
ctxt->xptr = xmlStrEqual(name, (xmlChar *) "xpointer");
|
||||
#endif
|
||||
xmlXPathEvalExpr(ctxt);
|
||||
ctxt->base = oldBase;
|
||||
ctxt->cur = oldCur;
|
||||
|
@ -1125,12 +1133,14 @@ xmlXPtrEvalFullXPtr(xmlXPathParserContextPtr ctxt, xmlChar *name) {
|
|||
xmlXPathObjectPtr obj = ctxt->value;
|
||||
|
||||
switch (obj->type) {
|
||||
#ifdef LIBXML_XPTR_LOCS_ENABLED
|
||||
case XPATH_LOCATIONSET: {
|
||||
xmlLocationSetPtr loc = ctxt->value->user;
|
||||
if ((loc != NULL) && (loc->locNr > 0))
|
||||
return;
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
case XPATH_NODESET: {
|
||||
xmlNodeSetPtr loc = ctxt->value->nodesetval;
|
||||
if ((loc != NULL) && (loc->nodeNr > 0))
|
||||
|
@ -1269,6 +1279,7 @@ xmlXPtrEvalXPointer(xmlXPathParserContextPtr ctxt) {
|
|||
* *
|
||||
************************************************************************/
|
||||
|
||||
#ifdef LIBXML_XPTR_LOCS_ENABLED
|
||||
static
|
||||
void xmlXPtrStringRangeFunction(xmlXPathParserContextPtr ctxt, int nargs);
|
||||
static
|
||||
|
@ -1283,6 +1294,7 @@ static
|
|||
void xmlXPtrRangeInsideFunction(xmlXPathParserContextPtr ctxt, int nargs);
|
||||
static
|
||||
void xmlXPtrRangeFunction(xmlXPathParserContextPtr ctxt, int nargs);
|
||||
#endif /* LIBXML_XPTR_LOCS_ENABLED */
|
||||
|
||||
/**
|
||||
* xmlXPtrNewContext:
|
||||
|
@ -1298,10 +1310,13 @@ void xmlXPtrRangeFunction(xmlXPathParserContextPtr ctxt, int nargs);
|
|||
xmlXPathContextPtr
|
||||
xmlXPtrNewContext(xmlDocPtr doc, xmlNodePtr here, xmlNodePtr origin) {
|
||||
xmlXPathContextPtr ret;
|
||||
(void) here;
|
||||
(void) origin;
|
||||
|
||||
ret = xmlXPathNewContext(doc);
|
||||
if (ret == NULL)
|
||||
return(ret);
|
||||
#ifdef LIBXML_XPTR_LOCS_ENABLED
|
||||
ret->xptr = 1;
|
||||
ret->here = here;
|
||||
ret->origin = origin;
|
||||
|
@ -1320,6 +1335,7 @@ xmlXPtrNewContext(xmlDocPtr doc, xmlNodePtr here, xmlNodePtr origin) {
|
|||
xmlXPtrHereFunction);
|
||||
xmlXPathRegisterFunc(ret, (xmlChar *)" origin",
|
||||
xmlXPtrOriginFunction);
|
||||
#endif /* LIBXML_XPTR_LOCS_ENABLED */
|
||||
|
||||
return(ret);
|
||||
}
|
||||
|
@ -1349,12 +1365,13 @@ xmlXPtrEval(const xmlChar *str, xmlXPathContextPtr ctx) {
|
|||
ctxt = xmlXPathNewParserContext(str, ctx);
|
||||
if (ctxt == NULL)
|
||||
return(NULL);
|
||||
ctxt->xptr = 1;
|
||||
xmlXPtrEvalXPointer(ctxt);
|
||||
|
||||
if ((ctxt->value != NULL) &&
|
||||
(ctxt->value->type != XPATH_NODESET) &&
|
||||
(ctxt->value->type != XPATH_LOCATIONSET)) {
|
||||
#ifdef LIBXML_XPTR_LOCS_ENABLED
|
||||
(ctxt->value->type != XPATH_LOCATIONSET) &&
|
||||
#endif
|
||||
(ctxt->value->type != XPATH_NODESET)) {
|
||||
xmlXPtrErr(ctxt, XML_XPTR_EVAL_FAILED,
|
||||
"xmlXPtrEval: evaluation failed to return a node set\n",
|
||||
NULL);
|
||||
|
@ -1395,6 +1412,7 @@ xmlXPtrEval(const xmlChar *str, xmlXPathContextPtr ctx) {
|
|||
return(res);
|
||||
}
|
||||
|
||||
#ifdef LIBXML_XPTR_LOCS_ENABLED
|
||||
/**
|
||||
* xmlXPtrBuildRangeNodeList:
|
||||
* @range: a range object
|
||||
|
@ -1601,9 +1619,6 @@ xmlXPtrBuildNodeList(xmlXPathObjectPtr obj) {
|
|||
case XML_COMMENT_NODE:
|
||||
case XML_DOCUMENT_NODE:
|
||||
case XML_HTML_DOCUMENT_NODE:
|
||||
#ifdef LIBXML_DOCB_ENABLED
|
||||
case XML_DOCB_DOCUMENT_NODE:
|
||||
#endif
|
||||
case XML_XINCLUDE_START:
|
||||
case XML_XINCLUDE_END:
|
||||
break;
|
||||
|
@ -2951,8 +2966,7 @@ xmlXPtrEvalRangePredicate(xmlXPathParserContextPtr ctxt) {
|
|||
NEXT;
|
||||
SKIP_BLANKS;
|
||||
}
|
||||
#endif /* LIBXML_XPTR_LOCS_ENABLED */
|
||||
|
||||
#define bottom_xpointer
|
||||
#include "elfgcchack.h"
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue