Commit b1a2884c authored by Wolfgang Meier's avatar Wolfgang Meier

Fix resolving of extension modules

parent 8b735de1
......@@ -263,13 +263,13 @@ declare %private function pm:modelSequence($ident as xs:string, $seq as element(
declare %private function pm:lookup($modules as array(*), $task as xs:string, $arity as xs:int) as map(*)? {
if (array:size($modules) > 0) then
let $module := array:head($modules)
let $module := $modules(array:size($modules))
let $fn := function-lookup(QName($module?uri, $task), $arity)
return
if (exists($fn)) then
map { "function": $fn, "prefix": $module?prefix }
else
pm:lookup(array:tail($modules), $task, $arity)
pm:lookup(array:subarray($modules, 1, array:size($modules) - 1), $task, $arity)
else
()
};
\ No newline at end of file
......@@ -144,6 +144,9 @@ declare %private function pmu:fix-module-paths($modules as array(*)) {
array {
for $module in $modules?*
return
map:new(($module, map:entry("at", system:get-module-load-path() || "/" || $module?at)))
if (matches($module?at, "^(/|xmldb:).*")) then
$module
else
map:new(($module, map:entry("at", system:get-module-load-path() || "/" || $module?at)))
}
};
\ No newline at end of file
......@@ -66,7 +66,7 @@ return
if ($doc) then
let $xml := doc($config:data-root || "/" || $doc)
let $fo :=
pmu:process($config:odd-root || "/" || $odd, $xml, $config:output-root, "fo", "../generated")
pmu:process($config:odd-root || "/" || $odd, $xml, $config:output-root, "print", "../generated", ())
return
if ($source) then
$fo
......
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