Maybe it's Friday and I'm not thinking clearly, but I'm struggling with a little problem. I have a string of strings separated by a delimiter. I would like to take the set of strings and convert each into an element node in a variable tree. There could be any number of strings in the set from 1 to n. The resulting tree would that many element nodes as well.
The input string comes from a parameter as the following:
Code:
<xsl:param name="StringSet" select="'First,Second,Third'"/>
The desired output looks something like this:
Code:
<xsl:variable name="stringTree" >
<Strings>
<String>First</String>
<String>Second</String>
<String>Third</String>
</Strings>
</xsl:variable>
Any suggestions as to parse the input string to create this kind of tree? On a good day, I feel like I should be able to do this in my sleep :) Using Saxon 8.9 XSLT 2.0.
Thank you.