Alexandru Popescu wrote:
Considering a node:

/foo/bar/mynode with a property @my:property

I would like

1/ to find the version of this node whose my:property was 'data':

//element(*, nt:frozenNode)[EMAIL PROTECTED]:property = 'data'
        and jcr:frozenUuid = '<the uuid of /foo/bar/mynode>']

please note that you need the uuid of the node in question, because the current path of a node in a workspace does not identify the node in the version storage. A version of a node can be checked out to any place in a workspace.

2/ to find a labeled version of mynode (label that I know)

//element(*, nt:versionLabels)/jcr:deref(@labelIKnow, '*')/*[jcr:frozenUuid = '<the uuid of /foo/bar/mynode>']

The query dereferences all nt:versionLabel nodes with a @labelIKnow reference property in the version storage. The target of the references are nt:version nodes and their children are the nt:frozenNodes with the versioned properties.

regards
 marcel

Reply via email to