Skip to content

Commit a068e65

Browse files
committed
create proper array of objects
1 parent a8a5c8f commit a068e65

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

add/data/xql/getAnnotationsInText.xql

+4-5
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,12 @@ declare function local:getAnnotations($uriSharp as xs:string, $annotations as el
4949
let $plist as array(*) :=
5050
array {
5151
for $p in tokenize($annotation/@plist, '\s+')
52+
where starts-with($p, $uriSharp)
5253
return
53-
if (starts-with($p, $uriSharp)) then
54-
(concat('{id:"', $id, '__', substring-after($p, $uriSharp), '"}'))
55-
else
56-
()
54+
map {
55+
'id': concat( $id, '__', substring-after($p, $uriSharp))
56+
}
5757
}
58-
let $plist := string-join($plist, ',')
5958
return
6059
map {
6160
'id': $id,

0 commit comments

Comments
 (0)