RelativeLocationPath ::= Step | RelativeLocationPath '/' Step | AbbreviatedRelativeLocationPath
(n node)
| 385 | |
| 386 | // RelativeLocationPath ::= Step | RelativeLocationPath '/' Step | AbbreviatedRelativeLocationPath |
| 387 | func (p *parser) parseRelativeLocationPath(n node) node { |
| 388 | opnd := n |
| 389 | Loop: |
| 390 | for { |
| 391 | opnd = p.parseStep(opnd) |
| 392 | switch p.r.typ { |
| 393 | case itemSlashSlash: |
| 394 | p.next() |
| 395 | opnd = newAxisNode("descendant-or-self", allNode, "", "", "", opnd) |
| 396 | case itemSlash: |
| 397 | p.next() |
| 398 | default: |
| 399 | break Loop |
| 400 | } |
| 401 | } |
| 402 | return opnd |
| 403 | } |
| 404 | |
| 405 | // Step ::= AxisSpecifier NodeTest Predicate* | AbbreviatedStep |
| 406 | func (p *parser) parseStep(n node) (opnd node) { |
no test coverage detected