jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Samuel Cox <crankydi...@gmail.com>
Subject xpath searches using version labels
Date Wed, 29 Apr 2009 20:19:47 GMT
Assume I have some number of nodes of type A, which have a defined 
number of properties (P1, P2, etc).  Each A node is named N.  For each 
node, I create multiple versions tagged with labels like (L1, L2, L3).

Is there a one-shot xpath expression that will let me search all L1 
versions of A nodes that have P1 = 'foo'?

Something like:

//version_hist_associated_with_As/L1[@P1 = 'foo']

I'm thinking there isn't, but figured I'd ask.

The only way that I know how to do with an algorithm.

For each A,
   path = a.getVersionHistory.getVersionByLabel("L1").getPath
   search(path + [@P1 = 'foo'])
Combine results.

Or something like that.

Am I way off base?

Any tips are appreciated.

Samuel Cox

View raw message