Commit f7f498d3 authored by Wolfgang's avatar Wolfgang

bugfix: generating an app based on teipublisher.odd or tei_simplePrint.odd...

bugfix: generating an app based on teipublisher.odd or tei_simplePrint.odd failed. Hide tei_simplePrint as it will never work correctly.
parent 20366d94
......@@ -29,7 +29,7 @@ declare option output:media-type "application/json";
let $odd := (request:get-parameter("odd", ()), session:get-attribute($config:session-prefix || ".odd"), $config:odd)[1]
let $allOdds :=
dbutil:scan-resources(xs:anyURI($config:odd-root), function ($resource) {
if (ends-with($resource, ".odd")) then
if (not(matches($resource, '.*(tei_simplePrint|docx)\.odd$')) and ends-with($resource, ".odd")) then
let $name := replace($resource, "^.*/([^/\.]+)\..*$", "$1")
let $displayName := (
doc($resource)/tei:TEI/tei:teiHeader/tei:fileDesc/tei:titleStmt/tei:title[@type = "short"]/string(),
......
......@@ -59,7 +59,13 @@ declare function local:create-data-collection() {
declare function local:generate-code($collection as xs:string) {
for $source in xmldb:get-child-resources($collection || "/resources/odd")[ends-with(., ".odd")][not(.=("teipublisher.odd", "tei_simplePrint.odd"))]
let $allOdds := xmldb:get-child-resources($collection || "/resources/odd")[ends-with(., ".odd")]
let $odds :=
if (count($allOdds) > 3) then
$allOdds[not(.=("teipublisher.odd", "tei_simplePrint.odd"))]
else
$allOdds
for $source in $odds
let $odd := doc($collection || "/resources/odd/" || $source)
let $pi := tpu:parse-pi($odd, (), $source)
for $module in
......
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