source: exist/branches/proglue_production_rev4605_xquery4884/python/build/lib/ndgUtils/xquery/atomList.xq @ 4886

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/exist/branches/proglue_production_rev4605_xquery4884/python/build/lib/ndgUtils/xquery/atomList.xq@4886
Revision 4886, 591 bytes checked in by sdonegan, 10 years ago (diff)

Creating operational branch for ndgUtils as used on proglue

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';
4<docs>
5{
6for $DE in collection($targetCollection)/entry/id let $f:=util:document-name($DE) return
7<dgMetadataRecord>
8    <repositoryID>{tokenize(string($DE), '__ATOM__')[2]}</repositoryID>
9    <fileName>{util:collection-name($DE)}/{$f}</fileName>
10    <created>{xmldb:created(util:collection-name($DE),$f)}</created>
11</dgMetadataRecord>
12}
13</docs>
Note: See TracBrowser for help on using the repository browser.