Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix imports #519

Merged
merged 2 commits into from
Jan 9, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions add/data/xql/getAnnotationsInText.xql
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ xquery version "3.1";
@author <a href="mailto:[email protected]">Daniel Röwenstrunk</a>
:)

(: IMPORTS ================================================================= :)

import module namespace edition = "http://www.edirom.de/xquery/edition" at "../xqm/edition.xqm";

(: NAMESPACE DECLARATIONS ================================================== :)

declare namespace ft = "http://exist-db.org/xquery/lucene";
Expand All @@ -17,8 +21,6 @@ declare namespace output = "http://www.w3.org/2010/xslt-xquery-serialization";
declare namespace request = "http://exist-db.org/xquery/request";
declare namespace xlink = "http://www.w3.org/1999/xlink";
declare namespace xmldb = "http://exist-db.org/xquery/xmldb";
import module namespace eutil = "http://www.edirom.de/xquery/eutil" at "../xqm/eutil.xqm";


(: OPTION DECLARATIONS ===================================================== :)

Expand All @@ -37,14 +39,14 @@ declare function local:findAnnotations($uri as xs:string, $edition as xs:string)
edition:collection($edition)//mei:annot[matches(@plist, $uri)]
};

declare function local:getAnnotations($uriSharp as xs:string, $annotations as element()*) as array(*)* {
declare function local:getAnnotations($uriSharp as xs:string, $annotations as element()*) as array(*) {
array {
for $annotation in $annotations
let $id := $annotation/string(@xml:id)
let $uri := concat('xmldb:exist://', document-uri($annotation/root()), '#', $id)
let $prio := $annotation/mei:ptr[@type = "priority"]/replace(@target, '#', '')
let $cat := $annotation/mei:ptr[@type = "categories"]/replace(@target, '#', '')
let $plist as array(*)* :=
let $plist as array(*) :=
array {
for $p in tokenize($annotation/@plist, '\s+')
return
Expand Down
Loading