Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
fontane-notizbuecher
SADE
Commits
099b7736
Commit
099b7736
authored
Nov 15, 2017
by
Mathias Goebel
🎠
Browse files
XQSuite added
parent
524552be
Changes
2
Hide whitespace changes
Inline
Side-by-side
modules/fontane/misc.xqm
View file @
099b7736
...
...
@@ -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()],
...
...
modules/fontane/tests.xq
0 → 100644
View file @
099b7736
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"
))
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment