diff --git a/xq/restx_dict_cached.xq b/xq/restx_dict_cached.xq index db84ff6..e0723b8 100644 --- a/xq/restx_dict_cached.xq +++ b/xq/restx_dict_cached.xq @@ -440,7 +440,8 @@ declare %rest:path("{$lang}/dict/{$id}") %output:method("html") %output:html-version('5') function page:by-id($lang, $id) { - let $doc-index := index-of($page:sorted, $page:sorted[@xml:id=`{$id}`]) + (: let $doc-index := index-of($page:sorted, $page:sorted[@xml:id=`{$id}`]) :) + let $doc-index := index-where($page:sorted, fn { ./@xml:id=$id }) let $pagenum := ceiling($doc-index div $page:items) return web:redirect('../dict', {'page': $pagenum}, web:decode-url($id)) };