source: exist/trunk/xquery/atomSummary.xq @ 4231

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/exist/trunk/xquery/atomSummary.xq@4326
Revision 4231, 447 bytes checked in by cbyrom, 11 years ago (diff)

Add support for doing lists and summaries of atom docs via ndgDirectory and the existInterface class + add necessary xquery files for this + add new method to
allow retrieval of the collection to which an atom with a specified ID belongs - including the associated xquery file + extend tests to exercise these new features
+ add custom Atom error + improve preservation of key atom attributes when loading existing atoms into an Atom object + improve determining default atom collection

Line 
1(: This query provides a summary line for a free text search into the atom for use in
2    browse. SEARCHSTRING should be overwritten with target query :)
3declare default element namespace 'http://www.w3.org/2005/Atom';
4for $DE in collection('/db/atoms')//root()[. &= 'SEARCHSTRING']
5return <summary>
6<id>{$DE/entry/id/text()}</id>
7<name>{$DE/entry/title/text()}</name>
8<type>{string($DE/entry/category[@term="ATOM_TYPE"]/@label)}</type>
9</summary>
Note: See TracBrowser for help on using the repository browser.