| OLD | NEW |
| 1 /* | 1 /* |
| 2 * xpath.c: XML Path Language implementation | 2 * xpath.c: XML Path Language implementation |
| 3 * XPath is a language for addressing parts of an XML document, | 3 * XPath is a language for addressing parts of an XML document, |
| 4 * designed to be used by both XSLT and XPointer | 4 * designed to be used by both XSLT and XPointer |
| 5 *f | 5 *f |
| 6 * Reference: W3C Recommendation 16 November 1999 | 6 * Reference: W3C Recommendation 16 November 1999 |
| 7 * http://www.w3.org/TR/1999/REC-xpath-19991116 | 7 * http://www.w3.org/TR/1999/REC-xpath-19991116 |
| 8 * Public reference: | 8 * Public reference: |
| 9 * http://www.w3.org/TR/xpath | 9 * http://www.w3.org/TR/xpath |
| 10 * | 10 * |
| (...skipping 13990 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 14001 #ifdef LIBXML_XPTR_ENABLED | 14001 #ifdef LIBXML_XPTR_ENABLED |
| 14002 case XPATH_OP_RANGETO:{ | 14002 case XPATH_OP_RANGETO:{ |
| 14003 xmlXPathObjectPtr range; | 14003 xmlXPathObjectPtr range; |
| 14004 xmlXPathObjectPtr res, obj; | 14004 xmlXPathObjectPtr res, obj; |
| 14005 xmlXPathObjectPtr tmp; | 14005 xmlXPathObjectPtr tmp; |
| 14006 xmlLocationSetPtr newlocset = NULL; | 14006 xmlLocationSetPtr newlocset = NULL; |
| 14007 xmlLocationSetPtr oldlocset; | 14007 xmlLocationSetPtr oldlocset; |
| 14008 xmlNodeSetPtr oldset; | 14008 xmlNodeSetPtr oldset; |
| 14009 int i, j; | 14009 int i, j; |
| 14010 | 14010 |
| 14011 if (op->ch1 != -1) | 14011 if (op->ch1 != -1) { |
| 14012 total += | 14012 total += |
| 14013 xmlXPathCompOpEval(ctxt, &comp->steps[op->ch1]); | 14013 xmlXPathCompOpEval(ctxt, &comp->steps[op->ch1]); |
| 14014 CHECK_ERROR0; |
| 14015 } |
| 14016 if (ctxt->value == NULL) { |
| 14017 XP_ERROR0(XPATH_INVALID_OPERAND); |
| 14018 } |
| 14014 if (op->ch2 == -1) | 14019 if (op->ch2 == -1) |
| 14015 return (total); | 14020 return (total); |
| 14016 | 14021 |
| 14017 if (ctxt->value->type == XPATH_LOCATIONSET) { | 14022 if (ctxt->value->type == XPATH_LOCATIONSET) { |
| 14018 /* | 14023 /* |
| 14019 * Extract the old locset, and then evaluate the result of t
he | 14024 * Extract the old locset, and then evaluate the result of t
he |
| 14020 * expression for all the element in the locset. use it to g
row | 14025 * expression for all the element in the locset. use it to g
row |
| 14021 * up a new locset. | 14026 * up a new locset. |
| 14022 */ | 14027 */ |
| 14023 CHECK_TYPE0(XPATH_LOCATIONSET); | 14028 CHECK_TYPE0(XPATH_LOCATIONSET); |
| (...skipping 1362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 15386 xmlXPathTranslateFunction); | 15391 xmlXPathTranslateFunction); |
| 15387 | 15392 |
| 15388 xmlXPathRegisterFuncNS(ctxt, (const xmlChar *)"escape-uri", | 15393 xmlXPathRegisterFuncNS(ctxt, (const xmlChar *)"escape-uri", |
| 15389 (const xmlChar *)"http://www.w3.org/2002/08/xquery-functions", | 15394 (const xmlChar *)"http://www.w3.org/2002/08/xquery-functions", |
| 15390 xmlXPathEscapeUriFunction); | 15395 xmlXPathEscapeUriFunction); |
| 15391 } | 15396 } |
| 15392 | 15397 |
| 15393 #endif /* LIBXML_XPATH_ENABLED */ | 15398 #endif /* LIBXML_XPATH_ENABLED */ |
| 15394 #define bottom_xpath | 15399 #define bottom_xpath |
| 15395 #include "elfgcchack.h" | 15400 #include "elfgcchack.h" |
| OLD | NEW |