Hi folks,
I am trying to execute an XPath query of the following form:

/jcr:root/a/(b or c)

but XPathQueryBuilder is generating a 'Only attribute axis is allowed in predicate' exception. This is odd as I don't think '(...)' constitutes a predicate. Should an XPath of the form above work right now?

Also I found that the | operator was not handled in XPathQueryBuilder, i.e.

/jcr:root/a/(b|c)

was not parsed properly. The | was ignored, so the query ended up looking for something like /a/b/c, which of course is wrong.

Another question: is it reasonable to bypass XPath and SQL entirely and build a query directly by creating QueryNode's? The reason I ask, is that the CalDAV query I am trying to support is coming in in the form of CalDAV's own XML syntax. Right now I am converting that to XPath and then Jackrabbit converts that to the QueryNode tree. It may be more efficient for me to bypass XPath and go direct to QueryNode's. I would be interested in knowing if there are any pitfalls in doing that.

--
Cyrus Daboo

Reply via email to