LocationPath ::= RelativeLocationPath | AbsoluteLocationPath
(n node)
| 366 | |
| 367 | // LocationPath ::= RelativeLocationPath | AbsoluteLocationPath |
| 368 | func (p *parser) parseLocationPath(n node) (opnd node) { |
| 369 | switch p.r.typ { |
| 370 | case itemSlash: |
| 371 | p.next() |
| 372 | opnd = newRootNode("/") |
| 373 | if isStep(p.r.typ) { |
| 374 | opnd = p.parseRelativeLocationPath(opnd) // ?? child:: or self ?? |
| 375 | } |
| 376 | case itemSlashSlash: |
| 377 | p.next() |
| 378 | opnd = newRootNode("//") |
| 379 | opnd = p.parseRelativeLocationPath(newAxisNode("descendant-or-self", allNode, "", "", "", opnd)) |
| 380 | default: |
| 381 | opnd = p.parseRelativeLocationPath(n) |
| 382 | } |
| 383 | return opnd |
| 384 | } |
| 385 | |
| 386 | // RelativeLocationPath ::= Step | RelativeLocationPath '/' Step | AbbreviatedRelativeLocationPath |
| 387 | func (p *parser) parseRelativeLocationPath(n node) node { |
no test coverage detected