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

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

Various updates to the xquery files - to remove usage of invalid specs
and dependency on obsolete function calls. Also add the inputParse_xquery_lib.xquery
file - referenced from the xquery files but not currently included in codebase.
NB, changes made to allow use of Saxon java library to do xqueries - to
remove the need for the discovery service eXist DB.

  • NB, also changes tested by comparing saxon transforms to eXist ones; these

were found to be identical.

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';
3declare variable $targetCollection as xs:string := 'TargetCollection';
4for $DE in collection($targetCollection)/dgMetadata/dgMetadataRecord[exists(dgDataEntity)]
5let $f:=util:document-name($DE)
6return
7<dgMetadataRecord>
8(: Yes, there is redundant info, we'll sort that out later, rapid bug fix
9mode :)
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>
Note: See TracBrowser for help on using the repository browser.