Commit 534d519d authored by Wolfgang's avatar Wolfgang

Avoid regex for filtering out unwanted documents. Filter on document-node instead.

parent a4d5f1c0
......@@ -254,7 +254,10 @@ declare variable $config:data-root := $config:app-root || "/data";
:)
declare variable $config:data-default := $config:data-root || "/test";
declare variable $config:data-exclude := "(taxonomy.xml|/doc(/blog)?)";
declare variable $config:data-exclude := (
doc($config:data-root || "/taxonomy.xml"),
collection($config:data-root || "/doc")
);
declare variable $config:default-odd := "teipublisher.odd";
......
......@@ -56,7 +56,11 @@ declare
function app:sort($items as element()*, $sortBy as xs:string?) {
let $items :=
if (count($config:data-exclude) = 1) then
$items[not(matches(document-uri(root(.)), $config:data-exclude))]
typeswitch ($config:data-exclude)
case document-node() return
$items except $config:data-exclude
default return
$items[not(matches(document-uri(root(.)), $config:data-exclude))]
else
$items
return
......
......@@ -250,7 +250,9 @@ declare variable $config:data-root := $$config-data$$;
:)
declare variable $config:data-default := $config:data-root;
declare variable $config:data-exclude := "taxonomy.xml";
declare variable $config:data-exclude := (
doc($config:data-root || "/taxonomy.xml")
);
declare variable $config:default-odd := "$$config-odd$$";
......
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