Hi All,
Can anyone please tell me what is wrong in this statment?
String statement = "//element(*,
nt:unstructured)[jcr:like(@jcr:name, 'event%')] order by @jcr:name
descending";
Query q =
session.getWorkspace().getQueryManager().createQuery(statement,
Query.XPATH);
NodeIterator nodes = q.execute().getNodes();
There are a lot of nodes with name starts with 'event', also I tried to
use [...@jcr:name='history'] as I have nodes that have exact name 'history',
but always the itereator is empty!
Notice, when the statement is like: "//element(*, nt:unstructured)"
without constraints then it works and return results.
So can anyone please help me what could be the problem?
I use jackrabbit 2.1.0, I know xpath is depricated, but I have to use the
xpath.
Thank you in advance.