Commit 099b7736 authored by Mathias Goebel's avatar Mathias Goebel 🎠
Browse files

XQSuite added

parent 524552be
......@@ -5,9 +5,20 @@ import module namespace config="http://textgrid.de/ns/SADE/config" at "../config
import module namespace console="http://exist-db.org/xquery/console";
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";
declare variable $f-misc:metadata-collection := collection("/db/sade-projects/textgrid/data/xml/meta");
declare
%test:arg("baseUri","textgrid:16b00") %test:assertEquals("Notizbuch C07")
%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()
};
declare function f-misc:cite($node as node(), $model as map(*)) {
let $url := request:get-url(),
$res := tokenize($url, '/')[last()],
......
xquery version "3.1";
import module namespace test="http://exist-db.org/xquery/xqsuite"
at "resource:org/exist/xquery/lib/xqsuite/xqsuite.xql";
(: this is the main test script for fontane specific modules.
it should run during startup and stores the results at /db/test-results.xml
where all other test suites should add their two pennies worth.
:)
test:suite(
inspect:module-functions(xs:anyURI("misc.xqm"))
)
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