jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Klimetschek <aklim...@day.com>
Subject Re: XPath query -- can I use a wildcard for attribute name?
Date Wed, 18 Nov 2009 10:15:36 GMT
On Wed, Nov 18, 2009 at 10:17, Tom <thomas.auinger@byteconsult.de> wrote:
>
> Good morning,
>
> I was wondering if jackrabbit supports xpath queries using an attribute
> wildcard, such as:
>
> - //*[@*] to select any element with at least one attribute
> - some/path/*[@*="JB007"] to select at elements in the given path which have
> one attribute with the value "JB007"

No, a * is not supported for properties/attributes. For your second
query however, a jcr:contains should work (but note that it's a full
text index and depends on indexing configuration, word stemming,
etc.):

/jcr:root/some/path/*[jcr:contains(., "JB007")]

Regards,
Alex

-- 
Alexander Klimetschek
alexander.klimetschek@day.com

Mime
View raw message