Re: [xsl] How to convert a recursive function to a loop, using XSLT 2.0?

Subject: Re: [xsl] How to convert a recursive function to a loop, using XSLT 2.0?
From: "Martin Honnen martin.honnen@xxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 10 May 2019 11:26:29 -0000
On 10.05.2019 13:21, Costello, Roger L. costello@xxxxxxxxx wrote:

My input file consists of a sequence (sourceSeq) of <Byte> elements
representing a sequence of null-terminated strings. I want to create a
function that returns a sequence of <String> elements. For example, with this
sourceSeq:

<Byte>48</Byte> <Byte>69</Byte> <Byte>00</Byte> <Byte>4A</Byte> <Byte>69</Byte> <Byte>6C</Byte> <Byte>6C</Byte> <Byte>00</Byte>

the function should return:

<String>Hi</String>
<String>Jill</String>

Seems like a job for <xsl:for-each-group select="Byte" group-ending-with="Byte[. = '00']"> <String>...</String> </xsl:for-each-group> where the ... processes current-group()[position() lt last()] to turn bytes into characters/strings.

Current Thread