Hi Thomas I've created https://issues.apache.org/jira/browse/OAK-2864
Regards Julian On Tue, May 12, 2015 at 2:00 PM, Thomas Mueller <[email protected]> wrote: > Hi, > > Could you log a bug for Oak please? I think the correct query is (a), and > that should also work for Oak. I implemented the XPath parser for Oak, and > was not aware that true() and false() are functions... See also > http://www.w3schools.com/xpath/xpath_functions.asp > > Regards, > Thomas > > > > On 12/05/15 13:24, "Julian Sedding" <[email protected]> wrote: > >>Hi all >> >>I am working on the upgrade of a JR2 app to Oak and discovered an >>incompatibility in the xpath syntax.q >> >>In JR2 (actually CRX 2) both of the following queries for nodes with a >>boolean property can be parsed, however only query (a) returns search >>results. >> >>(a) /jcr:root/test//*[@foo = true()] >>(b) /jcr:root/test//*[@foo = true] >> >>On Oak 1.2, query (a) results in an exception[0] and query (b) returns >>search results. >> >>This begs three questions: >>1. Which of the two is syntactically correct? Or are both? >>2. Should both return the same results on JR2? >>3. Should the parser in Oak be more lenient and ensure backwards >>compatible behaviour? >> >>Regards >>Julian >> >>[0] java.text.ParseException: Query: /jcr:root/test//*[@foo = >>true((*))]; expected: ] >
