Revision 1398
Added by Aaron Marcuse-Kubitza over 12 years ago
lib/xpath.py | ||
---|---|---|
112 | 112 |
while True: |
113 | 113 |
# Split path |
114 | 114 |
if parser.str_('{'): |
115 |
last = tree[-1] |
|
115 |
try: last = tree[-1] |
|
116 |
except IndexError: parser.syntax_err('./{') |
|
116 | 117 |
last.other_branches = _paths() |
117 | 118 |
parser.str_('}', required=True) |
118 | 119 |
if parser.str_('/'): # common subpath after {} |
Also available in: Unified diff
xpath.py: parse(): Split paths: Raise a SyntaxException if can't attach a split path because there is no parent element to attach to