source: TI01-discovery/trunk/ws-DBBackend/XMLDBMessageService.fullText.xq @ 1477

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI01-discovery/trunk/ws-DBBackend/XMLDBMessageService.fullText.xq@1477
Revision 1477, 638 bytes checked in by mpritcha, 13 years ago (diff)

Refactored web service to act as client to XMLDB database.

Line 
1xquery version "1.0";
2
3declare namespace  xdb="http://exist-db.org/xquery/xmldb";
4declare namespace  util="http://exist-db.org/xquery/util";
5declare namespace  query="http://ndg.nerc.ac.uk/query";
6
7for $x in collection('/db/dif/')//DIF[. &= '__term__']
8        let $col := util:collection-name($x)
9        let $doc := util:document-name($x)
10        let $Entry_Title := <Entry_Title>{$x//Entry_Title}</Entry_Title>
11        let $Data_Center := <Data_Center>{$x//Data_Center_Name/Short_Name}</Data_Center>
12        return
13                <query:fullTextResult>
14                        <document>{$col}/{$doc}</document>
15                        <summary>{$Entry_Title}{$Data_Center}</summary>
16                </query:fullTextResult>
Note: See TracBrowser for help on using the repository browser.