@@ -3,6 +3,7 @@ xquery version "3.1";
3
3
(: IMPORTS ================================================================= :)
4
4
5
5
import module namespace edition = "http://www.edirom.de/xquery/edition" at "data/xqm/edition.xqm" ;
6
+ import module namespace eutil = "http://www.edirom.de/xquery/eutil" at "data/xqm/eutil.xqm" ;
6
7
7
8
(: NAMESPACE DECLARATIONS ================================================== :)
8
9
@@ -20,8 +21,8 @@ declare option output:omit-xml-declaration "yes";
20
21
(: VARIABLE DECLARATIONS =================================================== :)
21
22
22
23
declare variable $edition := request:get-parameter ("edition" , "" );
23
- declare variable $editionUri := if ($ edition) then edition :findEdition ($edition) else ( );
24
- declare variable $preferences := if ($editionUri) then ( doc ( edition:getPreferencesURI ( $editionUri))) else ( );
24
+ declare variable $editionUri := edition:findEdition ($edition);
25
+ declare variable $additional_css_path := eutil:getPreference ( 'additional_css_path' , $editionUri);
25
26
26
27
let $eoEditionFiles := collection ('/db/apps' )//edirom:edition[@xml:id]
27
28
let $eoEditionFilesCount := count ($eoEditionFiles)
@@ -77,9 +78,9 @@ let $eoIndexPage := <html>
77
78
()
78
79
else
79
80
(<!-- TODO if prefs css then include here --> ,
80
- if ($preferences//entry[@key = " additional_css_path" and @ value != '' ] )
81
+ if ($additional_css_path)
81
82
then
82
- <link rel = "stylesheet" href = "{string-join ((request:get-context-path (), substring-after ($preferences//entry[@key = ' additional_css_path' ]/@ value , 'xmldb:exist:///db/' )), '/' )} " />
83
+ <link rel = "stylesheet" href = "{string-join ((request:get-context-path (), substring-after ($additional_css_path, 'xmldb:exist:///db/' )), '/' )} " />
83
84
else (),
84
85
<script type = "text/javascript" src = "app.js" />,
85
86
<!-- **WHERE TO OPEN LINKS** --> ,
0 commit comments