jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ahmed Elshereay <AElsher...@idc.com>
Subject xpath query problem
Date Fri, 16 Jul 2010 10:46:48 GMT
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 

        Query q = 
        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 

Thank you in advance.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message