After reading through the JSR-170 spec, I have cobbled together this
xpath query which will return the most-recently updated documents in
descending order:
(i.e. for creating a paragraph on the home page that lists "Recently
Updated Pages: " )
.//element(*,mgnl:content)/MetaData[1] order by @mgnl:lastmodified
descending
Well... It returns:
19ms
/Foo/MetaData
/Foo/Bar/MetaData
/Bar/MetaData
... etc
Is there a way I can construct an xpath query to just return the
parent part of that? so it would return:
/Foo
/Foo/Bar
/Bar
?
It's not a HUGE deal, since I can run the query, and easily use
jstl / el functions in the jsp to strip off the trailing /MetaData
on each of those handles... but I was just wondering if those with
more JCR XPath experience would be able to provide me with a "clean"
way of doing that in just the query.
Is there a way to set a limit on number of results returned in the
XPath query? I didn't see anything in the JSR-170 spec about this.
Any input is appreciated.
Ryan
----------------------------------------------------------------
for list details see
http://documentation.magnolia.info/docs/en/editor/stayupdated.html
----------------------------------------------------------------