* xmlXPathCompRelativeLocationPath: * @ctxt: the XPath Parser context * * [3] RelativeLocationPath ::= Step * | RelativeLocationPath '/' Step * | AbbreviatedRelativeLocationPath * [11] AbbreviatedRelativeLocationPath ::= RelativeLocationPath '//' Step * * Compile a relative location path. */
| 10366 | * Compile a relative location path. |
| 10367 | */ |
| 10368 | static void |
| 10369 | xmlXPathCompRelativeLocationPath |
| 10370 | (xmlXPathParserContextPtr ctxt) { |
| 10371 | SKIP_BLANKS; |
| 10372 | if ((CUR == '/') && (NXT(1) == '/')) { |
| 10373 | SKIP(2); |
| 10374 | SKIP_BLANKS; |
| 10375 | PUSH_LONG_EXPR(XPATH_OP_COLLECT, AXIS_DESCENDANT_OR_SELF, |
| 10376 | NODE_TEST_TYPE, NODE_TYPE_NODE, NULL, NULL); |
| 10377 | } else if (CUR == '/') { |
| 10378 | NEXT; |
| 10379 | SKIP_BLANKS; |
| 10380 | } |
| 10381 | xmlXPathCompStep(ctxt); |
| 10382 | CHECK_ERROR; |
| 10383 | SKIP_BLANKS; |
| 10384 | while (CUR == '/') { |
| 10385 | if ((CUR == '/') && (NXT(1) == '/')) { |
| 10386 | SKIP(2); |
| 10387 | SKIP_BLANKS; |
| 10388 | PUSH_LONG_EXPR(XPATH_OP_COLLECT, AXIS_DESCENDANT_OR_SELF, |
| 10389 | NODE_TEST_TYPE, NODE_TYPE_NODE, NULL, NULL); |
| 10390 | xmlXPathCompStep(ctxt); |
| 10391 | } else if (CUR == '/') { |
| 10392 | NEXT; |
| 10393 | SKIP_BLANKS; |
| 10394 | xmlXPathCompStep(ctxt); |
| 10395 | } |
| 10396 | SKIP_BLANKS; |
| 10397 | } |
| 10398 | } |
| 10399 | |
| 10400 | /** |
| 10401 | * xmlXPathCompLocationPath: |
no test coverage detected