Commit 051d2dda authored by Mathias Goebel's avatar Mathias Goebel 🎠
Browse files

add namespace, minor formatting

parent f1e8649d
......@@ -13,11 +13,12 @@ module namespace index="https://fontane-nb.dariah.eu/indexapi";
declare namespace output = "http://www.w3.org/2010/xslt-xquery-serialization";
declare namespace tei="http://www.tei-c.org/ns/1.0";
declare namespace test="http://exist-db.org/xquery/xqsuite";
declare namespace tgmd="http://textgrid.info/namespaces/metadata/core/2010";
declare namespace xhtml="http://www.w3.org/1999/xhtml";
import module namespace rest="http://exquery.org/ns/restxq";
import module namespace config="http://textgrid.de/ns/SADE/config" at "../config/config.xqm";
import module namespace ixp="http://fontane-nb.dariah.eu/index-processor" at "index-processor.xqm";
import module namespace rest="http://exquery.org/ns/restxq";
declare variable $index:dataPath := "/db/sade-projects/textgrid/data/xml/data";
......@@ -288,9 +289,9 @@ return
(:~
: Returns available image from TextGrid Repository
: @param $type the index to look up, one of: plc, wrk, psn, eve, org
: @param $id the xml:id of an entity in the database
: @param $type the index to look up, on of: plc, wrk, psn, eve, org
: @return an array of URIs
: @return an array of URIs or an empty array
:)
declare
%rest:GET
......@@ -308,7 +309,5 @@ as item()* {
href="https://textgridlab.org/1.0/tgsearch-public/search/?q=(title:%22{$type}:{$id}%22)" />
let $tgsearch := hc:send-request($request)[2]
return
[
$tgsearch//tgmd:textgridUri/string()
]
[ $tgsearch//tgmd:textgridUri/string() ]
};
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment