Scan Absolute Location Path SYNOPSYS [2] AbsoluteLocationPath ::= '/' RelativeLocationPath? | AbbreviatedAbsoluteLocationPath [10] AbbreviatedAbsoluteLocationPath ::= '//' RelativeLocationPath We combine these two rules into one rule for better performance: [2,10] AbsoluteLocationPath ::= '/' RelativeLocationPath?
| 1552 | 0 - failure |
| 1553 | */ |
| 1554 | static int my_xpath_parse_AbsoluteLocationPath(MY_XPATH *xpath) |
| 1555 | { |
| 1556 | if (!my_xpath_parse_term(xpath, MY_XPATH_LEX_SLASH)) |
| 1557 | return 0; |
| 1558 | |
| 1559 | xpath->context= xpath->rootelement; |
| 1560 | |
| 1561 | if (my_xpath_parse_term(xpath, MY_XPATH_LEX_SLASH)) |
| 1562 | { |
| 1563 | xpath->context= new Item_nodeset_func_descendantbyname(xpath->context, |
| 1564 | "*", 1, |
| 1565 | xpath->pxml, 1); |
| 1566 | return my_xpath_parse_RelativeLocationPath(xpath); |
| 1567 | } |
| 1568 | |
| 1569 | my_xpath_parse_RelativeLocationPath(xpath); |
| 1570 | |
| 1571 | return (xpath->error == 0); |
| 1572 | } |
| 1573 | |
| 1574 | |
| 1575 | /* |
no test coverage detected