jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From neuropunk <akula.regis...@gmail.com>
Subject Re: Getting node/node's property for particular version
Date Fri, 27 Nov 2009 09:38:36 GMT



Alexander Klimetschek wrote:
> 
> On Thu, Nov 26, 2009 at 13:50, neuropunk <akula.register@gmail.com> wrote:
>>> I have versionable node which type is nt:file. Every node's version
>>> contains content and properties.
>>> Please, help me create XPath query to:
>>> 1) particular version of this node;
>>> 2) content (file's content) of node with particular version;
>>> 3) property of node with particular version.
>>
>> Addition to previous email:
>> Or maybe somebody knows a way to get:
>> 1) content (file's content) of node with particular version;
>> 2) property of node with particular version.
> 
> You can search below "/jcr:root/jcr:system/jcr:versionStorage", see
> section 8.2.2.2 of the JCR 1.0 spec [1]. For example, to do a fulltext
> search for "foobar", you would do:
> 
> /jcr:root/jcr:system/jcr:versionStorage//jcr:frozenNode[jcr:contains(.,
> "foobar")]
> 
> Note that for the above to work the repository.xml must have a
> "global" SearchIndex configured (see bottom of default repository.xml
> where it is enabled by default).
> 
> However, if you already have the node in question from the API, it is
> recommended to use the versioning API rather than XPath.
> 
> [1]
> http://www.day.com/specs/jcr/1.0/8.2.2.2_Searching_and_Traversing_Version_Storage.html
> 
> Regards,
> Alex
> 
> -- 
> Alexander Klimetschek
> alexander.klimetschek@day.com
> 
> 

Alexander, thank you for reply. It helped me to solve my problem.
Just want to add: key idea which helped me to solve with problem is
contained in sections 8.2 - 8.2.2 of Content Repository Specification.

Thanks,
Sahsa

-- 
View this message in context: http://n4.nabble.com/Getting-node-node-s-property-for-particular-version-tp788188p788625.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.

Mime
View raw message