Is there an easy way on how to split a string based from the required length? For example, I have a string:
AAAAABBBBB1111122222RRRRR
You can use analyze-string to break up the data:
<xsl:template match="Data">
<xsl:variable name="tokens" as="xs:string*">
<xsl:analyze-string select="." regex=".{{1,5}}">
<xsl:matching-substring>
<xsl:sequence select="."/>
</xsl:matching-substring>
</xsl:analyze-string>
</xsl:variable>
<xsl:value-of select="$tokens" separator=" "/>
</xsl:template>