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

Add illustrations to stk

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