Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/exist/trunk/xquery/molesList.xq
Revision 4427,
746 bytes
checked in by cbyrom, 12 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 | |
---|
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) :) |
---|
2 | declare default element namespace 'http://ndg.nerc.ac.uk/moles'; |
---|
3 | declare variable $targetCollection as xs:string := 'TargetCollection'; |
---|
4 | <docs> |
---|
5 | { |
---|
6 | for $DE in collection($targetCollection)/dgMetadata/dgMetadataRecord[exists(dgDataEntity)] |
---|
7 | let $f:=util:document-name($DE) |
---|
8 | return |
---|
9 | <dgMetadataRecord> |
---|
10 | {$DE/dgMetadataID/repositoryIdentifier}{$DE/dgMetadataID/localIdentifier} |
---|
11 | <repositoryID>{string($DE/dgMetadataID/localIdentifier)}</repositoryID> |
---|
12 | <fileName>{$f}</fileName> |
---|
13 | <created>{xmldb:created(util:collection-name($DE),$f)}</created> |
---|
14 | </dgMetadataRecord> |
---|
15 | } |
---|
16 | </docs> |
---|
Note: See
TracBrowser
for help on using the repository browser.