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: Query language issues
Date Mon, 21 Feb 2005 09:20:04 GMT
Hi Timur,

> In //*[@my:includeInMainStream='true'] order by @my:publishingDate
> descending
> It complains about @ in @my:publishingDate clause
> So that only order by publishingDate is accepted, but doesn't work anyway

hmm, works fine for me. Could you please create a jira bug with 
instructions how to reproduce it? Thanks

> Also any expression apart from //* returns nothing, i.e. just /text//* gives
> 0 hits, whereas 
> SELECT * FROM my:article WHERE jcr:path LIKE '/text/%' gives what it
> supposed to give.

XPath uses a virtual XML document refered to as document view mapping in 
the jsr 170 spec. Because the root element in that document is the root 
node of the workspace any absolute XPath must start with /jcr:root. In 
your case that would be something like:
/jcr:root/text//*[@my:includeInMainStream='true']

You may also use a relative XPath. In that case the context for the 
query is the root node of the workspace:
text//*[@my:includeInMainStream='true']

Relevant section in the spec is: 6.6.3.3

regards
  Marcel

Mime
View raw message