Bug in fn:fold-right?

Monday, 20 November 2023 · 3 messages · last reply 21 Nov 2023
TT
Thompson, Timothy20 Nov 2023 20:59 #
Greetings, I noticed that there seems to be an issue with fn:fold-right in BaseX (10.8 beta). When I pass it a sequence of elements, they do not get atomized/accumulated. Example:
let $data := <data>
  <a>a</a>
  <b>b</b>
  <c>c</c>
</data>
return
  <test>{
    fold-right(
      $data/*,
      "",
      concat(?, ".", ?)
    )
  }</test>
returns: <test/> The same query in Saxon-HE 11.4 returns: <test>a.b.c.</test> Best regards, Tim
-- Tim A. Thompson (he, him) Librarian for Applied Metadata Research Yale University Library
CG
Christian Grün21 Nov 2023 16:50 #
Hi Tim, Thanks for the pointer. It seems that the reported bug has been fixed just recently (at least I couldn’t reproduce it anymore). Could you try the latest snapshot? [1] Thanks in advance, Christian [1] https://files.basex.org/releases/latest/
Quoted text · Timothy · 63 lines
On Mon, Nov 20, 2023 at 9:00 PM Thompson, Timothy <timothy.thompson at yale.edu> wrote: > Greetings, > > > > I noticed that there seems to be an issue with fn:fold-right in BaseX > (10.8 beta). When I pass it a sequence of elements, they do not get > atomized/accumulated. Example: > > > > let $data := <data> > > <a>a</a> > > <b>b</b> > > <c>c</c> > > </data> > > return > > <test>{ > > fold-right( > > $data/*, > > "", > > concat(?, ".", ?) > > ) > > }</test> > > > > returns: <test/> > > > > The same query in Saxon-HE 11.4 returns: <test>a.b.c.</test> > > > > Best regards, > > Tim > > > > > > -- > Tim A. Thompson (*he, him*) > Librarian for Applied Metadata Research > Yale University Library > > >
TT
Thompson, Timothy21 Nov 2023 17:37 #
Thanks, Christian—always one step ahead ;) Confirmed it’s working with the latest snapshot. Tim
-- Tim A. Thompson (he, him) Librarian for Applied Metadata Research Yale University Library www.linkedin.com/in/timathompson<http://www.linkedin.com/in/timathompson> timathom at protonmail.com<mailto:timothy.thompson at yale.edu>
Quoted text · Christian Grün · 34 lines
From: Christian Grün <christian.gruen at gmail.com> Date: Tuesday, November 21, 2023 at 10:51 AM To: Thompson, Timothy <timothy.thompson at yale.edu> Cc: BaseX <basex-talk at mailman.uni-konstanz.de> Subject: Re: [basex-talk] Bug in fn:fold-right? Hi Tim, Thanks for the pointer. It seems that the reported bug has been fixed just recently (at least I couldn’t reproduce it anymore). Could you try the latest snapshot? [1] Thanks in advance, Christian [1] https://files.basex.org/releases/latest/ On Mon, Nov 20, 2023 at 9:00 PM Thompson, Timothy <timothy.thompson at yale.edu<mailto:timothy.thompson at yale.edu>> wrote: Greetings, I noticed that there seems to be an issue with fn:fold-right in BaseX (10.8 beta). When I pass it a sequence of elements, they do not get atomized/accumulated. Example: let $data := <data> <a>a</a> <b>b</b> <c>c</c> </data> return <test>{ fold-right( $data/*, "", concat(?, ".", ?) ) }</test> returns: <test/> The same query in Saxon-HE 11.4 returns: <test>a.b.c.</test> Best regards, Tim -- Tim A. Thompson (he, him) Librarian for Applied Metadata Research Yale University Library

⚡Generated with XQuery