Commit 8c85f4b7 authored by Mathias Goebel's avatar Mathias Goebel 🎠
Browse files

get notebook title by GET param "nb"

parent 8dfa5142
......@@ -16,7 +16,12 @@ declare
%test:arg("baseUri","") %test:assertEquals("")
function f-misc:get-title-by-baseUri($baseUri as xs:string) as xs:string? {
if($baseUri = "") then () else
$f-misc:metadata-collection//tgmd:object[tgmd:generic/tgmd:generated/tgmd:textgridUri[starts-with(., $baseUri)]]//tgmd:title/string()
$f-misc:metadata-collection//tgmd:textgridUri[starts-with(string(.), $baseUri)]/ancestor::tgmd:object//tgmd:title/string()
declare function f-misc:nb-param-to-title($node as node(), $model as map(*), $nb)
as xs:string? {
f-misc:get-title-by-baseUri( "textgrid:" || $nb )
declare function f-misc:cite($node as node(), $model as map(*)) {
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