source: exist/trunk/xquery/MDIPList.xq @ 4427

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

Upgrade the various 'list' xqueries - to nest all results in a single
root element - so that only one document need be retrieved to get all
results + adjust ndgDirectory to cope with processing the new results +
fix the various namespaces mentioned in the codebase to map to the
current atom/moles ones.

Line 
1declare default element namespace 'http://www.oceannet.org/mdip/xml';
2declare variable $targetCollection as xs:string := 'TargetCollection';
3<docs>
4{
5for $DE in collection($targetCollection)/Metadata/DatasetIdentifier
6let $f:=util:document-name($DE)
7return
8<dgMetadataRecord><repositoryID>{string($DE)}</repositoryID>
9    <fileName>{util:document-name($DE)}</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.