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

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/exist/trunk/xquery/atomList.xq@4326
Revision 4231, 547 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 is an Atom listing query for TargetCollection - returns EntryIDs and the files in which they exist :)
2declare default element namespace 'http://www.w3.org/2005/Atom';
3declare variable $targetCollection as xs:string := 'TargetCollection';
4for $DE in collection($targetCollection)/entry/id let $f:=util:document-name($DE) return
5<dgMetadataRecord>
6    <repositoryID>{string($DE)}</repositoryID>
7    <fileName>{util:collection-name($DE)}/{$f}</fileName>
8    <created>{xmldb:created(util:collection-name($DE),$f)}</created>
9</dgMetadataRecord>
Note: See TracBrowser for help on using the repository browser.