diff options
author | Mike Hommey <glandium@debian.org> | 2009-09-10 22:10:39 +0200 |
---|---|---|
committer | Mike Hommey <glandium@debian.org> | 2009-09-10 22:10:39 +0200 |
commit | c3e4f3c26035bc93a69e5aa2ad435809e8be8a4e (patch) | |
tree | e65557c2e042fe8a77635b0548db10ad97bc1bfe /xpointer.c | |
parent | e248b20a3b7df364cc9617b8685b4c190338bcd2 (diff) | |
download | libxml2-c3e4f3c26035bc93a69e5aa2ad435809e8be8a4e.tar.gz |
Import upstream version 2.7.4upstream/2.7.4.dfsg
Diffstat (limited to 'xpointer.c')
-rw-r--r-- | xpointer.c | 28 |
1 files changed, 18 insertions, 10 deletions
@@ -1152,10 +1152,12 @@ xmlXPtrEvalFullXPtr(xmlXPathParserContextPtr ctxt, xmlChar *name) { if (name == NULL) XP_ERROR(XPATH_EXPR_ERROR); while (name != NULL) { + ctxt->error = XPATH_EXPRESSION_OK; xmlXPtrEvalXPtrPart(ctxt, name); /* in case of syntax error, break here */ - if (ctxt->error != XPATH_EXPRESSION_OK) + if ((ctxt->error != XPATH_EXPRESSION_OK) && + (ctxt->error != XML_XPTR_UNKNOWN_SCHEME)) return; /* @@ -1299,12 +1301,19 @@ xmlXPtrEvalXPointer(xmlXPathParserContextPtr ctxt) { * * ************************************************************************/ +static void xmlXPtrStringRangeFunction(xmlXPathParserContextPtr ctxt, int nargs); +static void xmlXPtrStartPointFunction(xmlXPathParserContextPtr ctxt, int nargs); +static void xmlXPtrEndPointFunction(xmlXPathParserContextPtr ctxt, int nargs); +static void xmlXPtrHereFunction(xmlXPathParserContextPtr ctxt, int nargs); +static void xmlXPtrOriginFunction(xmlXPathParserContextPtr ctxt, int nargs); +static void xmlXPtrRangeInsideFunction(xmlXPathParserContextPtr ctxt, int nargs); +static void xmlXPtrRangeFunction(xmlXPathParserContextPtr ctxt, int nargs); /** @@ -1732,7 +1741,7 @@ xmlXPtrNbLocChildren(xmlNodePtr node) { * Function implementing here() operation * as described in 5.4.3 */ -void +static void xmlXPtrHereFunction(xmlXPathParserContextPtr ctxt, int nargs) { CHECK_ARITY(0); @@ -1750,7 +1759,7 @@ xmlXPtrHereFunction(xmlXPathParserContextPtr ctxt, int nargs) { * Function implementing origin() operation * as described in 5.4.3 */ -void +static void xmlXPtrOriginFunction(xmlXPathParserContextPtr ctxt, int nargs) { CHECK_ARITY(0); @@ -1783,7 +1792,7 @@ xmlXPtrOriginFunction(xmlXPathParserContextPtr ctxt, int nargs) { * ---------------- * */ -void +static void xmlXPtrStartPointFunction(xmlXPathParserContextPtr ctxt, int nargs) { xmlXPathObjectPtr tmp, obj, point; xmlLocationSetPtr newset = NULL; @@ -1877,7 +1886,7 @@ xmlXPtrStartPointFunction(xmlXPathParserContextPtr ctxt, int nargs) { * syntax error. * ---------------------------- */ -void +static void xmlXPtrEndPointFunction(xmlXPathParserContextPtr ctxt, int nargs) { xmlXPathObjectPtr tmp, obj, point; xmlLocationSetPtr newset = NULL; @@ -2022,7 +2031,7 @@ xmlXPtrCoveringRange(xmlXPathParserContextPtr ctxt, xmlXPathObjectPtr loc) { * location-set, a range location representing the covering range of * x is added to the result location-set. */ -void +static void xmlXPtrRangeFunction(xmlXPathParserContextPtr ctxt, int nargs) { int i; xmlXPathObjectPtr set; @@ -2168,7 +2177,7 @@ xmlXPtrInsideRange(xmlXPathParserContextPtr ctxt, xmlXPathObjectPtr loc) { * location children of x. * */ -void +static void xmlXPtrRangeInsideFunction(xmlXPathParserContextPtr ctxt, int nargs) { int i; xmlXPathObjectPtr set; @@ -2622,13 +2631,12 @@ xmlXPtrGetLastChar(xmlNodePtr *node, int *indx) { if (cur == NULL) return(-1); - + if ((cur->type == XML_ELEMENT_NODE) || (cur->type == XML_DOCUMENT_NODE) || (cur->type == XML_HTML_DOCUMENT_NODE)) { if (pos > 0) { cur = xmlXPtrGetNthChild(cur, pos); - pos = 0; } } while (cur != NULL) { @@ -2757,7 +2765,7 @@ xmlXPtrGetEndPoint(xmlXPathObjectPtr obj, xmlNodePtr *node, int *indx) { * all be character points. * ------------------------------ */ -void +static void xmlXPtrStringRangeFunction(xmlXPathParserContextPtr ctxt, int nargs) { int i, startindex, endindex = 0, fendindex; xmlNodePtr start, end = 0, fend; |