jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Long <l...@magillem.com>
Subject error with xpath query
Date Thu, 08 Jul 2010 14:11:50 GMT
Hi there :)

I wrote an xpath query to search content in jackrabbit but I can't make 
it work..

/jcr:root/5512 LG-Ant//element(*,mnt:resource)[(jcr:contains(@jcr:text, 
'test sample') OR jcr:contains(@jcr:name, 'test sample') OR 
jcr:contains(@jcr:owner, 'test sample') OR 
jcr:contains(@jcr:createdDate, 'test sample') OR 
jcr:contains(@jcr:lastModifiedDate, 'test sample') OR 
jcr:contains(@jcr:extension, 'test sample') OR jcr:contains(@jcr:data, 
'test sample') OR jcr:contains(@jcr:title, 'test sample') OR 
jcr:contains(@jcr:from, 'test sample') OR jcr:contains(@jcr:to, 'test 
sample')) AND @jcr:type != 'null']

I get the following error :

javax.jcr.query.InvalidQueryException: Lexical error at line 1, column 
105.  Encountered: "c" (99), after : ":" for statement: for $v in 
/jcr:root/5512 LG-Ant//element(*,mnt:resource)[(jcr:contains(@jcr:text, 
'test sample') OR jcr:contains ....

It seems that it doesn't like the OR jcr:contains(...)



View raw message