source: exist/trunk/xquery/numsimSummary.xq @ 4409

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/exist/trunk/xquery/numsimSummary.xq@4409
Revision 4409, 587 bytes checked in by lawrence, 12 years ago (diff)

More general numsimSummary xquery that picks up both met office and
badc numsim records. (For some reason I can't get the qname out
easily). Note that this will break current browse search of numsim
documents.

Line 
1(: This query provides a NumSim summary line for use in the browse search :)
2declare namespace m='http://ndg.nerc.ac.uk/moles';
3declare namespace n='http://ndg.nerc.ac.uk/numsim';
4for $dd in collection('/db/NumSim')//root()[. &= 'SEARCHSTRING']
5return <summary>
6<id>{$dd/n:simulationMetadata/*/n:id/m:repositoryIdentifier/text()}__{$dd/n:simulationMetadata/*/n:id/m:schemeIdentifier/text()}__{$dd/n:simulationMetadata/*/n:id/m:localIdentifier/text()}</id>
7<name>{$dd/n:simulationMetadata/*/n:name/text()}</name>
8<type>numsim:{local-name($dd/n:simulationMetadata/*[1])}</type>
9</summary>
Note: See TracBrowser for help on using the repository browser.