Commit 132b9d49 authored by mrodzis's avatar mrodzis 🌎
Browse files

Improve index look-up (relates to #139)

parent 8d3a0eb9
......@@ -4,6 +4,7 @@ xquery version "3.1";
: given page.
:
: @author Mathias Göbel
: @author Michelle Weidling
: @version 1.1
: @since 2.5.6
: :)
......@@ -17,6 +18,7 @@ declare namespace tgmd="http://textgrid.info/namespaces/metadata/core/2010";
declare namespace xhtml="http://www.w3.org/1999/xhtml";
import module namespace config="http://textgrid.de/ns/SADE/config" at "../config/config.xqm";
import module namespace functx = "http://www.functx.com";
import module namespace ixp="http://fontane-nb.dariah.eu/index-processor" at "index-processor.xqm";
import module namespace rest="http://exquery.org/ns/restxq";
......@@ -221,7 +223,9 @@ declare
%test:assertTrue
function index:rendered-entity($id as xs:string)
as item()* {
let $node := $ixp:dataCollection/id($id)
let $index-uris := ("253sx.xml", "253t0.xml", "253t1.xml", "253t2.xml", "253t3.xml")
let $indices := $ixp:dataCollection[functx:substring-after-last(base-uri(.), "/") = $index-uris]
let $node := $indices/id($id)
let $type := $node/root()//tei:body/*[1]/local-name()
(: listEvent, listPlace, listOrg, listPerson or list :)
return
......
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