Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
fontane-notizbuecher
SADE
Commits
c0181d14
Commit
c0181d14
authored
Aug 24, 2018
by
Mathias Goebel
Browse files
add olde "Blattübersicht" at sade.develop
parent
ed311638
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
modules/fontane/toc-api.xqm
View file @
c0181d14
...
...
@@ -18,6 +18,7 @@ import module namespace rest="http://exquery.org/ns/restxq";
import module namespace config="http://textgrid.de/ns/SADE/config" at "../config/config.xqm";
declare variable $toc:dataPath := "/db/sade-projects/textgrid/data/xml/data/";
declare variable $toc:xhtmlPath := "/db/sade-projects/textgrid/data/xml/xhtml/";
declare
%rest:GET
...
...
@@ -30,8 +31,9 @@ function toc:table-of-contents($uri as xs:string)
{
let $doc := doc($toc:dataPath || $uri || ".xml")
let $toc := $doc//tei:TEI/tei:teiHeader/tei:fileDesc/tei:sourceDesc/tei:msDesc/tei:msContents/tei:ab/tei:list[@type="editorial"]
return
return
(
element div {
attribute class {"container"},
element div {
attribute class {"panel-group"},
for $item at $pos in $toc/tei:item
...
...
@@ -72,5 +74,9 @@ function toc:table-of-contents($uri as xs:string)
}
}
}
}
},
if(config:get("sade.develop") = "true")
then doc( $toc:xhtmlPath || $uri || "/toc.xml" )
else ()
)
};
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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