From 8457cdce6e5fea870a00e713bc6d68ca5c6e2189 Mon Sep 17 00:00:00 2001 From: Wolfgang Meier Date: Tue, 15 Mar 2022 12:42:36 +0100 Subject: [PATCH] bugfix: @pb:mode should be applied before templates are processed or parameters are set --- content/model.xql | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/content/model.xql b/content/model.xql index 5c3803f..d60e55d 100644 --- a/content/model.xql +++ b/content/model.xql @@ -480,16 +480,15 @@ declare %private function pm:model($ident as xs:string, $model as element(tei:mo (), let $signature := $fn?function[1] let $classes := pm:get-class($ident, $model) - let $spec := $model/ancestor::tei:elementSpec[1] return try { if ($model/tei:desc) then {$model/tei:desc} else (), + pm:set-mode($model), pm:expand-template($model, $params, $output), pm:set-parameters($model), - pm:set-mode($model), { if ($model/pb:template) then