Hi,
In the GUI, I couldn't see if all the //al/text() elements were really displayed as one (1) concatenated objected or just repeated. Only after importing the result to an R-dataframe, I saw that //al/text() was displayed as separate elements. Adding 'fn:string-join($Beurt//al/text(), " ")' to the statement did the trick.
Ben
for $Debat in collection("Parl_Test") let $debate-id := fn:analyze-string( $Debat/officiele-publicatie/metadata/meta/@content, "(\d{8}-\d*-\d*)")//fn:match/*:group[@nr="1"]/text() for $Beurt at $CountInner in $Debat//spreekbeurt let $tekst := fn:string-join($Beurt//al/text(), " ") order by $debate-id return($debate-id, $CountInner, $tekst)
Op 09-03-2022 om 22:46 schreef Ben Engbers:
Hi
for $Debat at $CountOuter in collection("Parl_Test") (: where $CountOuter <= 3:) let $debate-id := fn:analyze-string( $Debat/officiele-publicatie/metadata/meta/@content, "(\d{8}-\d*-\d*)")//fn:match/*:group[@nr="1"]/text() order by $debate-id for $Beurt at $CountInner in $Debat//spreekbeurt let $tekst := $Beurt//al/text() return($debate-id, $CountInner, $tekst)
:-)
Ben Op 09-03-2022 om 17:45 schreef Zimmel, Daniel:
Are you simply counting the wrong items?
It seems to me you wanted to count: for $Beurt at $CountInner in $Debat//spreekbeurt
Daniel