jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sten R. Sandvik" <...@enonic.com>
Subject RE: XPATH query : how to find node not having a specific attribute
Date Thu, 02 Jun 2005 09:38:13 GMT

It's following the standard XPath rules so you would probably write it like this:
//*[not(@jcr:lockOwner)]


Regards,
Sten Roger Sandvik


-----Original Message-----
From: Bertrand LEGA [mailto:legabertrand@yahoo.fr]
Sent: Thu 6/2/2005 11:05 AM
To: jackrabbit-dev@incubator.apache.org
Subject: XPATH query : how to find node not having a specific attribute
 

Hello,


I'm trying to find all the unlocked nodes in my jcr with a query.
If a node is locked, the property jcr:lockOwner is created and holds the 
id of the user who locks the node.
And if the node is not locked, this property doesn't exist.

Of course, my mode implement mix:lockable.

My question is how to write my query to retreive the unlocked nodes (ie 
those without the attribute jcr:lockOwner) ?
//*[@jcr:lockOwner = null] doesn't seem to work.

I noticed there is a IS NOT NULL and IS NULL clause in the SQL language. 
Is there anything alike in XPATH ?

Any idea ?


Have a nice day,
Bertrand LEGA.





Mime
  • Unnamed multipart/mixed (inline, None, 0 bytes)
View raw message