Incorrect error using ancestor::node in XPath #133

Closed
rhdunn opened this Issue Oct 30, 2015 · 2 comments

Comments

Projects
None yet
2 participants
@rhdunn

rhdunn commented Oct 30, 2015

Given the XPath:

($foo//bar/ancestor::node)[1]

the error message:

'(' expected, got ')'

is displayed. This is incorrect, as the construct is valid. It looks like the syntax is trying to validate structures like node().

@ligasgr

This comment has been minimized.

Show comment
Hide comment
@ligasgr

ligasgr Nov 15, 2015

Owner

is the ancestor::node here pointing to an /ancestor with an element with name 'node'?
Something like this?

let $foo := <x><node><bar></bar></node></x>
return ($foo//bar/ancestor::node)[1]

It shouldn't be treated as an error, I agree.

Owner

ligasgr commented Nov 15, 2015

is the ancestor::node here pointing to an /ancestor with an element with name 'node'?
Something like this?

let $foo := <x><node><bar></bar></node></x>
return ($foo//bar/ancestor::node)[1]

It shouldn't be treated as an error, I agree.

@ligasgr ligasgr added the bug label Nov 15, 2015

@rhdunn

This comment has been minimized.

Show comment
Hide comment
@rhdunn

rhdunn Nov 15, 2015

That is correct, yes.

rhdunn commented Nov 15, 2015

That is correct, yes.

@ligasgr ligasgr closed this in 43b09c5 Nov 16, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment