Commit 4ca44fb7 authored by MRodz's avatar MRodz Committed by mrodzis
Browse files

Remove surplus module

parent 67cf878e
xquery version "3.1";
(:~
: @@@
:
: @author Michelle Rodzis
: @version 0.1
: @since TODO
:)
module namespace tei2print="http://fontane-nb.dariah.eu/tei2print";
import module namespace config="http://textgrid.de/ns/SADE/config" at "../../config/config.xqm";
import module namespace simpleHelpers="http://fontane-nb.dariah.eu/teisimplehelpers" at "teisimplehelpers.xqm";
declare namespace tei="http://www.tei-c.org/ns/1.0";
declare option exist:serialize "method=text media-type=text/plain indent=no";
declare function tei2print:main($nodes as node()*) as xs:string {
let $assure-dir := simpleHelpers:assure-dir-available("resources/tex/")
let $transform := element div {tei2print:transform($nodes)}
return xmldb:store($config:app-root || "/resources/tex/", "fontane-print.tex", $transform)
};
declare function tei2print:transform($nodes as node()*) as xs:string* {
for $node in $nodes return
typeswitch($node)
case text() return
$node
case element(tei:pb) return
"[" || (if($node/@n) then $node/@n else $node/@type) || "]"
case element(tei:list) return
"\startitemize " || tei2print:transform($node/node()) || "\stopitemize "
default return
tei2print:transform($node/node())
};
\ No newline at end of file
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