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 10673 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10684 /* ignore blanks */ | 10684 /* ignore blanks */ |
10685 ; | 10685 ; |
10686 } else if (NXT(len) == ':') { | 10686 } else if (NXT(len) == ':') { |
10687 #ifdef DEBUG_STEP | 10687 #ifdef DEBUG_STEP |
10688 xmlGenericError(xmlGenericErrorContext, | 10688 xmlGenericError(xmlGenericErrorContext, |
10689 "PathExpr: AbbrRelLocation\n"); | 10689 "PathExpr: AbbrRelLocation\n"); |
10690 #endif | 10690 #endif |
10691 lc = 1; | 10691 lc = 1; |
10692 break; | 10692 break; |
10693 } else if ((NXT(len) == '(')) { | 10693 } else if ((NXT(len) == '(')) { |
10694 » » /* Note Type or Function */ | 10694 » » /* Node Type or Function */ |
10695 if (xmlXPathIsNodeType(name)) { | 10695 if (xmlXPathIsNodeType(name)) { |
10696 #ifdef DEBUG_STEP | 10696 #ifdef DEBUG_STEP |
10697 xmlGenericError(xmlGenericErrorContext, | 10697 xmlGenericError(xmlGenericErrorContext, |
10698 "PathExpr: Type search\n"); | 10698 "PathExpr: Type search\n"); |
10699 #endif | 10699 #endif |
10700 lc = 1; | 10700 lc = 1; |
| 10701 } else if (ctxt->xptr && |
| 10702 xmlStrEqual(name, BAD_CAST "range-to")) { |
| 10703 lc = 1; |
10701 } else { | 10704 } else { |
10702 #ifdef DEBUG_STEP | 10705 #ifdef DEBUG_STEP |
10703 xmlGenericError(xmlGenericErrorContext, | 10706 xmlGenericError(xmlGenericErrorContext, |
10704 "PathExpr: function call\n"); | 10707 "PathExpr: function call\n"); |
10705 #endif | 10708 #endif |
10706 lc = 0; | 10709 lc = 0; |
10707 } | 10710 } |
10708 break; | 10711 break; |
10709 } else if ((NXT(len) == '[')) { | 10712 } else if ((NXT(len) == '[')) { |
10710 /* element name */ | 10713 /* element name */ |
(...skipping 4672 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
15383 xmlXPathTranslateFunction); | 15386 xmlXPathTranslateFunction); |
15384 | 15387 |
15385 xmlXPathRegisterFuncNS(ctxt, (const xmlChar *)"escape-uri", | 15388 xmlXPathRegisterFuncNS(ctxt, (const xmlChar *)"escape-uri", |
15386 (const xmlChar *)"http://www.w3.org/2002/08/xquery-functions", | 15389 (const xmlChar *)"http://www.w3.org/2002/08/xquery-functions", |
15387 xmlXPathEscapeUriFunction); | 15390 xmlXPathEscapeUriFunction); |
15388 } | 15391 } |
15389 | 15392 |
15390 #endif /* LIBXML_XPATH_ENABLED */ | 15393 #endif /* LIBXML_XPATH_ENABLED */ |
15391 #define bottom_xpath | 15394 #define bottom_xpath |
15392 #include "elfgcchack.h" | 15395 #include "elfgcchack.h" |
OLD | NEW |