Skip to content
Snippets Groups Projects
Commit f80550ef authored by Mathias Goebel's avatar Mathias Goebel :reminder_ribbon:
Browse files

Merge branch 'bugfix/comment-problematic-tei-functions-#7-#12' into 'develop'

Bugfix/comment problematic TEI functions (closes #7, #12)

Closes #12 and #7

See merge request !5
parents 14806be8 36584e38
No related branches found
No related tags found
1 merge request!5Bugfix/comment problematic TEI functions (closes #7, #12)
Pipeline #87871 passed
xquery version "3.1";
declare namespace xhtml="http://www.w3.org/1999/xhtml";
declare namespace xsl="http://www.w3.org/1999/XSL/Transform";
(: The function processing the TEI version works if we use the stylesheets as a
: standalone, but the path the function uses for finding the VERSION file is
: interpreted als db internal path by eXist-db -- which leads to errors. Thus
: we remove the TEI function here.:)
let $functions := doc("/db/apps/sade_assets/TEI-Stylesheets/common/functions.xsl")
let $empty-otherwise := <xsl:otherwise/>
let $replace := update replace $functions//xsl:function[@name = "tei:stylesheetVersion"]//xsl:otherwise with $empty-otherwise
let $log :=
if($functions//xsl:function[@name = "tei:stylesheetVersion"]//xsl:otherwise/*) then
util:log-system-out("Omission of stylesheet version NOT successfull.")
else
util:log-system-out("Successfully omitted stylesheet version.")
(: The stdheader functionality is not used in SADE's template. To avoid clutter
: in the resulting HTML we decided to cut out the stdheader completely (instead
: of just making it invisible in a *.css). :)
let $files-with-stdheader := collection("/db/apps/sade_assets/TEI-Stylesheets/html")[.//*[@name ="stdheader"]]
let $omit-stdhdr :=
for $file in $files-with-stdheader return
(update delete $file//xhtml:div[matches(@class, "stdheader")],
update delete $file//*[@name ="stdheader"])
return
if(collection("/db/apps/sade_assets/TEI-Stylesheets/html")[.//*[@name ="stdheader"]]) then
util:log-system-out("Omission of stdheader NOT successfull.")
else
util:log-system-out("Successfully omitted stdheader.")
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<type>library</type> <type>library</type>
<target>sade_assets</target> <target>sade_assets</target>
<prepare/> <prepare/>
<finish/> <finish>post-install.xq</finish>
<permissions user="admin" group="dba" mode="0775"/> <permissions user="admin" group="dba" mode="0775"/>
<changelog> <changelog>
<change version="1.0"> <change version="1.0">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment