//*[jcr:contains(., 'California')]/*/* Also have a look at XPath and the JCR specifics and extensions to XPath (section 6.6 of the spec http://jcp.org/en/jsr/detail?id=170).
Regards, Alex On Thu, Oct 2, 2008 at 12:36 AM, Joshua Oransky <[EMAIL PROTECTED]> wrote: > What I want is to search for text that may not appear in the house node, but > instead maybe in the state node, but would apply to the house. > > So someone who searched for California and New York would get all the house > nodes under the california and new york nodes, even though none of those > nodes contain either of those words. > > -Josh > > On Oct 1, 2008, at 2:46 PM, Alexander Klimetschek wrote: > >> Hi Josh, >> >> something like >> >> //california//element(*, my:House) >> >> where my:House is the node type identifying houses could do the trick. >> Or if you have a fixed hierarchy (houses are two levels under the >> state) and no specific node type for houses, this would work: >> >> //california/*/* >> >> Regards, >> Alex >> >> On Wed, Oct 1, 2008 at 7:52 PM, Joshua Oransky <[EMAIL PROTECTED]> wrote: >>> >>> I have a hierarchy that is utilizing inheritance; that is, my app >>> consolidates all information on an entire hierarchy on a single node. >>> >>> This means that information is spread across the hierarchy, but I >>> want my searches to come up with only the end node... >>> >>> For example, take this hierarchy: >>> >>> /country >>> /state >>> /city >>> /house >>> >>> I want my searches to only return house nodes, but the house node >>> doesn't contain information about the city, state, or country. Is there a >>> way to collapse the hierarchy for searches, so that a search for, say, >>> "California" returns all the houses in California, not the California >>> node? >>> >>> Thanks! -Josh >>> >> >> >> >> -- >> Alexander Klimetschek >> [EMAIL PROTECTED] > > -- Alexander Klimetschek [EMAIL PROTECTED]
