Hi all; I'm trying to execute a full-text XPath query (using jcr:contains). The problem is, I don't want to return the matching node, but an ancestor.
My repository is used for storing web site content (we're using Apache Sling). Each web page has a corresponding node, and each 'page' node can have any number of 'text block' nodes. A 'page' node is denoted by the property called @sling:resourceType with the value 'page'. When searching for a specific term, a matching node may be found in the 'text block' nodes. However, I want the search result to consist only of 'page' nodes. An example: Given a page 'A' with a text block node 'TB' with the text 'Lorem', and 'Lorem' as the given search term, the search result should contain page 'A'. So far, I've tried variations of this query: "/jcr:root/some/path//*...@sling:resourceType='page' and //*[jcr:contains(.//*, '" + term + "')]] ... but I generally get error messages telling me that the XPath feature I want is not supported. Any suggestions? -- Vidar S. Ramdal <[email protected]> - http://www.idium.no Akersgata 16, N-0158 Oslo, Norway
