... and don't forget to add it to the wiki once you have completed
your research ;-)
Thanks
Boris
On Feb 21, 2008, at 5:36 AM, Ryan Gardner wrote:
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
----------------------------------------------------------------
----------------------------------------------------------------
for list details see
http://documentation.magnolia.info/docs/en/editor/stayupdated.html
----------------------------------------------------------------