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
e8f040a2
Commit
e8f040a2
authored
Aug 15, 2018
by
Mathias Goebel
🎠
Browse files
use code-viewer for complete document code view
parent
7d106268
Changes
1
Hide whitespace changes
Inline
Side-by-side
modules/multiviewer/multiviewer.xqm
View file @
e8f040a2
...
...
@@ -6,16 +6,18 @@ declare namespace xhtml="http://www.w3.org/1999/xhtml";
declare namespace svg="http://www.w3.org/2000/svg";
declare namespace xlink="http://www.w3.org/1999/xlink";
declare namespace tgmd="http://textgrid.info/namespaces/metadata/core/2010";
declare default element namespace "http://www.tei-c.org/ns/1.0";
import module namespace tgclient="http://textgrid.info/namespaces/xquery/tgclient" at "/db/apps/textgrid-connect/tgclient.xqm";
import module namespace config="http://textgrid.de/ns/SADE/config" at "../config/config.xqm";
import module namespace
md
="http://
exist-db.org/xquery/markdown" at "/apps/markdown/content/markdown.xql
";
import module namespace
code
="http://
bdn-edition.de/ns/code-view
";
import module namespace dsk-view="http://semtonotes.github.io/SemToNotes/dsk-view" at '../semtonotes/SemToNotes.xqm';
import module namespace fontaneTransfo="http://fontane-nb.dariah.eu/Transfo" at '../fontane/transform.xqm';
import module namespace fontaneSfEx="http://fontane-nb.dariah.eu/SfEx" at '../fontane/surfaceExtract.xqm';
import module namespace fontaneLitVZ="http://fontane-nb.dariah.eu/LitVZ" at "../fontane/literaturverzeichnis.xqm";
import module namespace fontaneUeberblickskommentar="http://fontane-nb.dariah.eu/Ueberblickskommentar" at "../fontane/ueberblickskommentar.xqm";
import module namespace tgclient="http://textgrid.info/namespaces/xquery/tgclient" at "/db/apps/textgrid-connect/tgclient.xqm";
import module namespace md="http://exist-db.org/xquery/markdown" at "/apps/markdown/content/markdown.xql";
declare function mviewer:show($node as node(), $model as map(*), $id as xs:string, $view as xs:string?) as item()* {
switch (config:get("sade.develop"))
...
...
@@ -334,18 +336,14 @@ $data-dir := config:get('data-dir'),
$baseuri := substring-before( tokenize($docpath, '/')[last()], '.'),
$prerender := $data-dir || '/xml/xhtml/' || $baseuri || '/xml.xml'
return
if(exists($prerender))
if(exists($prerender)
and false()
)
then doc( $prerender )/*
else
element
xhtml:
div {
element div {
attribute class {'teixmlview'},
element xhtml:pre {
element xhtml:code {
attribute class {'html'},
serialize($node)
}
}
}
code:main($node)
=> serialize() => replace("xhtml:", "") => parse-xml()
}
};
declare function mviewer:renderTOC($docpath) {
...
...
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