I've a XSLT code like below with a simple comma seperated variable. But what I would like is to split that based on the comma and put every value in a for-each loop. I was trying it by using substring-before that don't work, I get a runtime error. Is this possible to do in XSLT 1.0 and what is the best way to do that?
Update: The variable is already inside my XSLT code and it is not coming from an external XML file.
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<xsl:variable name="SortOrder">Birthday, Housenumber, Zipcode, Carbrand, LicensePlate, Polis, Damageyears, Kmperyear</xsl:variable>
<xsl:variable name="delimeter">, </xsl:variable>
<xsl:for-each select="substring-before(SortOrder,delimeter)">
do something<br/>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>