Skip to content
Snippets Groups Projects
Commit 316c83bd authored by Ladislav Lhotka's avatar Ladislav Lhotka
Browse files

Fix XPath parser.

parent 259e9f5b
No related branches found
No related tags found
No related merge requests found
......@@ -140,7 +140,8 @@ class XPathParser(Parser):
except UnexpectedInput:
return self._location_path()
self.skip_ws()
if self.test_string("("):
if self.test_string("(") and fname not in (
"node", "comment", "processing-instruction", "text"):
self.skip_ws()
return self._path_expr(fname)
self.offset = start
......@@ -217,7 +218,7 @@ class XPathParser(Parser):
except EndOfInput:
return (Axis.child, (yid, self.mid[0]))
if next == "(":
return (Axis.child, _node_type(yid))
return (Axis.child, self._node_type(yid))
if next == ":":
self.offset += 1
next = self.peek()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment