Hello, On Thu, Jan 14, 2010 at 4:46 PM, Thomas Fromm <[email protected]> wrote: > used jackrabbit version 1.6 > > Hi, > > I want to look for a node which is not child of an another specific node e.g.: > > //Foobar[../name()!="abc:XYZ"] > > But this is not supported. > > How can I modify the xpath to work around this issue?
Apart from the fact that I doubt whether you are modelling your content in a sensible way, you can achieve what you want like this: //*[not(fn:name() = 'abc:XYZ')]/Foobar Also note that these are not the best performing (do not scale to hundres of thousands of nodes really well) queries, and that jackrabbit supports only a subset of xpath, where the minimal implemented set you can find in the jsr-170 Regards Ard > > --tf >
