source: exist/trunk/xquery/molesList.xq @ 3181

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/exist/trunk/xquery/molesList.xq@3181
Revision 3181, 583 bytes checked in by selatham, 12 years ago (diff)

bug fixes

Line 
1(: This moles listing query returns all the moles DataEntity documents and their local identifiers within a specific TargetCollection and a particular type (default is dgDataEntity) :)
2declare default element namespace 'http://ndg.nerc.ac.uk/moles';
3for $DE in collection('TargetCollection')/dgMetadata/dgMetadataRecord[exists(dgDataEntity)]
4let $f:=util:document-name($DE)
5return
6<dgMetadataRecord>
7<repositoryID>{string($DE/dgMetadataID/localIdentifier)}</repositoryID>
8<fileName>{$f}</fileName>
9<created>{xmldb:created(util:collection-name($DE),$f)}</created>
10</dgMetadataRecord>
Note: See TracBrowser for help on using the repository browser.