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
1664fe4d
Commit
1664fe4d
authored
Jul 11, 2017
by
Mathias Goebel
🎠
Browse files
tg mirador in iframe based on sandbox data
parent
e69cc1f2
Changes
1
Hide whitespace changes
Inline
Side-by-side
modules/fontane/misc.xqm
View file @
1664fe4d
...
...
@@ -5,6 +5,7 @@ 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 tgmd="http://textgrid.info/namespaces/metadata/core/2010";
declare namespace xhtml="http://www.w3.org/1999/xhtml";
declare function f-misc:cite($node as node(), $model as map(*)) {
...
...
@@ -388,9 +389,12 @@ switch ( config:get('sade.develop') )
};
declare function f-misc:mirador($node as node(), $model as map(*), $n){
if((string-length($n) lt 4) and matches($n, "^[A-Ea-e]\d+"))
then <iframe src="https://fontane-nb.dariah.eu/public/mirador/{replace(lower-case($n), '0(\d)', '$1')}.html" height="100%" width="100%"/>
else "Die Digitalisate zum gesuchten Notizbuch sind noch nicht verfügbar oder die Anfrage ist ungültig."
let $sandbox := doc( "/db/sade-projects/textgrid/data/xml" || "/sandbox-iiif.xml" )
let $url := "https://textgridlab.org/1.0/iiif/mirador/?uri="
let $book := if(string-length($n) = 2) then substring($n, 1, 1) || "0" || substring($n, 2, 1) else $n
let $uri := string($sandbox//tgmd:title[matches(., "Notizbuch_" || $book || "-IIIF")]/ancestor::tgmd:generic//tgmd:textgridUri)
return
<iframe src="{$url || $uri}" height="100%" width="100%"/>
};
declare function f-misc:debug( $node as node(), $model as map(*) ){
...
...
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