jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fabián Mandelbaum <fmandelb...@gmail.com>
Subject Querying for multi-valued properties with XPath
Date Tue, 06 Nov 2007 20:19:06 GMT
Hello list,

I was wondering if I can use XPath queries to query for properties
with multiple values in a similar way than using XPath for single-valued
properties. For example, I have a myns:keys property having
a list of Strings, one String for each key(word), thus myns:keys is

Now, if //*[@myns:single_valued_property = 'some_value'] is the XPath that
returns the node set having the myns:single_valued_property set to
some_value; which would be the XPath that returns the node set having
the myns:multival_property set to, say: val1, val2, val3 ?

I can imagine a solution involving getting all elements with the
property set (//*[@myns:multival_property]), and then iterating through
the values of multival_property trying to find matches (val1, val2 and
val3), but that's the 'last resort' solution I'd implement.

Thanks in advance, and sorry if this question has been asked before
 (if so, will some kind soul point me to it and its possible resolution?).


View raw message