Skip to content

Commit

Permalink
create proper array of objects
Browse files Browse the repository at this point in the history
  • Loading branch information
peterstadler committed Jan 16, 2025
1 parent a8a5c8f commit a068e65
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions add/data/xql/getAnnotationsInText.xql
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,12 @@ declare function local:getAnnotations($uriSharp as xs:string, $annotations as el
let $plist as array(*) :=
array {
for $p in tokenize($annotation/@plist, '\s+')
where starts-with($p, $uriSharp)
return
if (starts-with($p, $uriSharp)) then
(concat('{id:"', $id, '__', substring-after($p, $uriSharp), '"}'))
else
()
map {
'id': concat( $id, '__', substring-after($p, $uriSharp))
}
}
let $plist := string-join($plist, ',')
return
map {
'id': $id,
Expand Down

0 comments on commit a068e65

Please sign in to comment.