Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
fontane-notizbuecher
SADE
Commits
132b9d49
Commit
132b9d49
authored
May 06, 2020
by
mrodzis
💪
Browse files
Improve index look-up (relates to
#139
)
parent
8d3a0eb9
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
modules/fontane/index-api.xqm
View file @
132b9d49
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment