Hi, node of type nt:version only contain the meta data of your versionable node. e.g. when the version was created. the node that actually contains the properties of your versionable node are on a nt:frozenNode. that's why you get two results with your last query.
see section 8.2.2.5 of the jsr 170 specification. regards marcel Gaetano Sferra wrote: > Hello to everyone, > > In my scenario I've a custom versionable node called "mynode" that has a > string property of name "my:property". Now suppose to create a new workspace > adding a node of this type to it; the workspace structure should be like this: > > jcr:root > +-- jcr:system > | +-- jcr:versionStorage > +-- [EMAIL PROTECTED]:property = 'first'] > > Ok, everything works fine till now. Let's to change the property... we have > to checkout, modify and checkin the node; we now should have: > > jcr:root > +-- jcr:system > | +-- jcr:versionStorage > +-- [EMAIL PROTECTED]:property = 'modified'] > > No problems at all! Good. The "jcr:versionStorage" now should hold two > distinct version of "my:node" and I wish to search for the first one, here > starts the game (for me): > > //jcr:system/jcr:versionStorage[1]//element(mynode, nt:version)[EMAIL > PROTECTED]:property = 'first'] --> No match > //jcr:system/jcr:versionStorage[1]//element(mynode, nt:version)[EMAIL > PROTECTED]:property = 'first'] --> No match > //jcr:system/jcr:versionStorage//element(mynode, nt:version)[EMAIL > PROTECTED]:property = 'first'] --> No match > //element(mynode, nt:version)[EMAIL PROTECTED]:property = 'first'] --> No > match > //element(mynode, nt:version) --> No match > //element(mynode, nt:base) --> Matches everything (2 entries in > "jcr:versionStorage" and 1 in "jcr:root") > //element(mynode, nt:frozenNode) --> Matches 2 entries in "jcr:versionStorage" > > Looking the XPath syntax and examples in the JSR 170, the first query should > work (or maybe I missing something?!)... what's wrong? I wish to search in > the "jcr:versioningStorage" only, matching the right node and looking, as the > specifications says, for a "nt:version" node type. > Some ideas? > > Thanks > -- > A hopeful newbie > > __________________________________________________ > Do You Yahoo!? > Poco spazio e tanto spam? Yahoo! Mail ti protegge dallo spam e ti da tanto > spazio gratuito per i tuoi file e i messaggi > http://mail.yahoo.it > >