You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by Julian Reschke <ju...@gmx.de> on 2006/07/27 16:51:43 UTC
XPath query parser issue?
Hi,
I was playing around with the QueryNode trees generated by the Xpath
parser. What I found is that they seem to be the same for
"/a/b" and "/a | /b"
(confirmed by QueryParser.toString(node, "xpath", nsresolver), which in
both cases produces "/a/b").
This is a bug, right?
Best regards, Julian
Re: XPath query parser issue?
Posted by Marcel Reutegger <ma...@gmx.net>.
Hi Julian,
Julian Reschke wrote:
> I was playing around with the QueryNode trees generated by the Xpath
> parser. What I found is that they seem to be the same for
>
> "/a/b" and "/a | /b"
>
> (confirmed by QueryParser.toString(node, "xpath", nsresolver), which in
> both cases produces "/a/b").
>
> This is a bug, right?
yes it is. there are probably a lot more tokens that are ignored while
parsing the XPath / XQuery statement. The union operator is just one
of them.
The translator should probably be enhanced to throw an exception when
it encounters an unsupported feature instead of silently ignoring it.
Similar to a unknown function call in the statement.
regards
marcel