Commit e8f040a2 authored by Mathias Goebel's avatar Mathias Goebel 🎠
Browse files

use code-viewer for complete document code view

parent 7d106268
......@@ -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,17 +336,13 @@ $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()
}
};
......
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