diff --git a/add/index.xql b/add/index.xql
old mode 100755
new mode 100644
index 0bd642f8..cb834ba3
--- a/add/index.xql
+++ b/add/index.xql
@@ -3,6 +3,7 @@ xquery version "3.1";
(: IMPORTS ================================================================= :)
import module namespace edition = "http://www.edirom.de/xquery/edition" at "data/xqm/edition.xqm";
+import module namespace eutil = "http://www.edirom.de/xquery/eutil" at "data/xqm/eutil.xqm";
(: NAMESPACE DECLARATIONS ================================================== :)
@@ -20,8 +21,8 @@ declare option output:omit-xml-declaration "yes";
(: VARIABLE DECLARATIONS =================================================== :)
declare variable $edition := request:get-parameter("edition", "");
-declare variable $editionUri := if($edition) then edition:findEdition($edition) else();
-declare variable $preferences := if($editionUri) then(doc(edition:getPreferencesURI($editionUri))) else();
+declare variable $editionUri := edition:findEdition($edition);
+declare variable $additional_css_path := eutil:getPreference('additional_css_path', $editionUri);
let $eoEditionFiles := collection('/db/apps')//edirom:edition[@xml:id]
let $eoEditionFilesCount := count($eoEditionFiles)
@@ -77,9 +78,9 @@ let $eoIndexPage :=
()
else
(,
- if ($preferences//entry[@key = "additional_css_path" and @value != ''])
+ if ($additional_css_path)
then
-
+
else (),
,
,