jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcel Reutegger <marcel.reuteg...@gmx.net>
Subject Re: what's the matter on node search ?
Date Wed, 28 Sep 2005 14:25:29 GMT
Apart from the /jcr:root you also need to encode the last name test in 
your XPath statement. XML does not allow a QName to start with a digit.

so that's:
/jcr:root/jcr:system/jcr:versionStorage//_x0031_.2

see jsr-170 spec section 6.4.3
and http://www.w3.org/TR/REC-xml/#NT-Name

regards
  marcel

Raphael Wegmueller wrote:
> looks like you have to add the prefix /jcr:root to your path. see also
> http://article.gmane.org/gmane.comp.apache.jackrabbit.devel/89
> 
> hope this helps!
> /rofe
> 
> On 9/28/05, Yao Harrison <harrison.gyao@gmail.com> wrote:
> 
>>Hi list:
>>
>>code :
>>   public void searchVersion()throws RepositoryException{
>>       Workspace ws = session.getWorkspace();
>>       QueryManager qm = ws.getQueryManager();
>>       Query q =
>>qm.createQuery("/jcr:system/jcr:versionStorage//1.2",Query.XPATH);
>>       QueryResult qr = q.execute();
>>   }
>>
>>error info:
>>javax.jcr.query.InvalidQueryException: Internal error: data is not a
>>RelationQueryNode

Mime
View raw message