Commit 6ad45186 authored by sendler's avatar sendler 🐢
Browse files

Add illustrations to stk

parent 3511b81a
......@@ -42,8 +42,8 @@ as element(xhtml:div) {
: @param $uri A valid TextGrid-Base-URI without prefix
: @param $surface A string to match a tei:surface/attribute::n in the document (use “-” as delimiter)
: @return a html5 list with all entries
: @see http://localhost:8080/exist/restxq/api/stk/22jtk/57r
: @see https://fontane-nb.dariah.eu/api/stk/22jtk/57r
: @see http://localhost:8080/exist/restxq/api/stk/22jt7/1r
: @see https://fontane-nb.dariah.eu/api/stk/22jt7/1r
: :)
declare
%rest:GET
......@@ -64,6 +64,8 @@ as element(xhtml:div)
let $surface := tokenize($surface, "-")
let $reference := $doc//tei:surface[@n = $surface]//@xml:id
return
if (not(doc-available($docpath))) then error(QName("https://sade.textgrid.de/ns/error/fontane", "STK01"), "Document not in database.") else
if (not($surface = $doc//tei:surface/@n)) then error(QName("https://sade.textgrid.de/ns/error/fontane", "STK02"), "Surface «" || $surface || "» not available.") else
element xhtml:div {
attribute class { "notes" },
element xhtml:ul {
......@@ -73,6 +75,20 @@ as element(xhtml:div)
element xhtml:li {
attribute class { 'editorialNote' },
stk:noteParser($note)
},
for $figures in $doc//tei:surface[@n = $surface]//tei:zone[@type="illustration"]
return
element xhtml:li {
attribute class { "editorialNote" },
element xhtml:span {
attribute class { "target kursiv" },
text { "<Skizze>]" },
element xhtml:ul {
element xhtml:li {
$figures//tei:figDesc//text()
}
}
}
}
}
}
......@@ -83,8 +99,8 @@ as element(xhtml:div)
:
: @param $uri A valid TextGrid-Base-URI without prefix
: @return A html5 list with all entries
: @see http://localhost:8080/exist/restxq/api/stk/22jtk
: @see https://fontane-nb.dariah.eu/api/stk/22jtk
: @see http://localhost:8080/exist/restxq/api/stk/22jt7
: @see https://fontane-nb.dariah.eu/api/stk/22jt7
: :)
declare
%rest:GET
......@@ -101,6 +117,7 @@ as element(xhtml:div)
let $doc := doc($docpath)
let $reference := $doc//tei:surface//@xml:id
return
if (not(doc-available($docpath))) then error(QName("https://sade.textgrid.de/ns/error/fontane", "STK01"), "Document not in database.") else
element xhtml:div {
attribute class { "notes" },
element xhtml:ul {
......@@ -110,6 +127,20 @@ as element(xhtml:div)
element xhtml:li {
attribute class { "editorialNote" },
stk:noteParser($note)
},
for $figures in $doc//tei:zone[@type="illustration"]
return
element xhtml:li {
attribute class { "editorialNote" },
element xhtml:span {
attribute class { "target kursiv" },
text { "<Skizze>]" },
element xhtml:ul {
element xhtml:li {
$figures//tei:figDesc//text()
}
}
}
}
}
}
......
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