xquery version "3.0"; (: :declare default element namespace "abcd";:) declare namespace abcd = "http://www.tdwg.org/schemas/abcd/2.06"; declare namespace xmldb="http://exist-db.org/xquery/xmldb"; import module namespace admin="http://exist-db.org/xquery/admin-interface" at "admin.xql"; declare option exist:serialize "method=xhtml media-type=text/html indent=yes"; let $title := 'Simple Search RESTful Service' let $data-collection := '/db/rebind/public' (: get the search query string from the URL parameter :) let $q := request:get-parameter('query', '') let $search-type := request:get-parameter('search-type', '') let $found := collection($data-collection)//*[starts-with(., 'BGBM')] let $published-data :=

Published projects

Enter a search term in the box to search for full text string anywhere in the data file. Or to search by scientific name enter a partial or full scientific name.

For example searching for 'Poly' finds datasets containing the full scientific name Polygala pallida and Polyosma.

The following datasets have been published. Click the title to view details:

return reBiND - Project Data portal
{ for $param in request:get-parameter-names() return if ( $param = ("query") ) then () else }
{if (count(collection($data-collection)) > 0) then else( ) }
{if(not($q)) then ( $published-data )else( if($q != "" and $search-type = "full-text-search") then (

The following datasets contain the search text '{$q}' within the data file:

Click here to view a list of all published datasets.

) else ( if($q != "" and $search-type = "name-search") then (

The following datasets contain the search text '{$q}' within the scientific name:

    { for $result in collection($data-collection)//abcd:FullScientificNameString[contains(lower-case(.), lower-case($q))]/../../../../../../../../abcd:Metadata/abcd:Description/abcd:Representation/abcd:Title (:[.//text() = $q]:) let $titl := $result let $collName := util:collection-name($result) (:data($result/../../../../../../../../abcd:Metadata/abcd:Description/abcd:Representation/abcd:Title):) return
  • {data($titl)}
  • }

Click here to view a list of all published datasets.

) else (

There were no datasets that contain this search term.

Click here to view a list of all published datasets.

) ) )}

There are currently no published datasets.