Hi,

you can't search for substrings of the node name, but if you do store the node name in a property, then you can use either jcr:like or jcs:contains (not just "contains", the XPATH in Jackrabbit doesn't support it).

So try:
    //*[jcr:contains(@propertyName,'article')]
   or:
    //*[jcr:like(@propertyName, '%article%')]

Further reading here http://www.theserverside.com/tt/articles/article.tss?l=JCRPract and of course the JSR-170 specs.

Hope it helps.
Alessandro



Prakash Reddy K. L. V. wrote:

Hi,

I am using jackrabbit as my content repository.
Is there a way to search for nodes whose name contains a particular word using XPath? For example I want to search for all the nodes whose name contains "article".

I tried this query : /jcr:root/*article*
This does not work.

I also tried storing the name as property of the node and tried this query :
/jcr:root/[EMAIL PROTECTED]''article"]
This does not even get those nodes for which the value of the property is "article".

Is there any other way to achieve this ?

Thanks,
Prakash




Reply via email to