Commit f1e8649d authored by Mathias Goebel's avatar Mathias Goebel 🎠
Browse files

add doc and correct test

parent b292314b
......@@ -289,6 +289,7 @@ return
(:~
: Returns available image from TextGrid Repository
: @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
:)
declare
......@@ -297,13 +298,17 @@ declare
%output:method("json")
%test:arg("id", "Arnoldi-Denkmal")
%test:arg("type", "plc")
%test:assertTrue
function index:rendered-entity($type as xs:string, $id as xs:string)
as item()* {
let $request := <hc:request method="get" href="https://textgridlab.org/1.0/tgsearch-public/search/?q=(title:%22{$type}:{$id}%22)" />
let $request :=
<hc:request
method="get"
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