[xsl] passing coma separated values as params

Subject: [xsl] passing coma separated values as params
From: "Jan Limpens" <jan@xxxxxxxxxxx>
Date: Thu, 23 Nov 2006 22:05:30 -0200
Hello,

I need to output something like this:

<foo>
  <bar language="en" />
  <bar language="de" />
  <bar language="pt" />
</foo>

and it would be best if could pass the stylesheet a param like this:
<xsl:param name="languages" select="'de,en,pt'"/>
then I would somehow split this string into an array of strings or a
nodeset and I would iterate over this in a way similar to this...

<xsl:template match="/">
  <foo>
  <xsl:for-each select="$language-array/*">
     <bar>
        <xsl:attribute name="language">
           <xsl:value-of select="."/>
        </xsl:attribute>
     </bar>
  </xsl:for-each>
  </foo>
</xsl:match:template>

Anyone with an idea how I could achieve this?

I know, I could pass a nodeset to begin with, but that would
complexity just elsewhere and I don't have an idea how one could debug
such a stylesheet.

Everything .NET xslt 1.0.

Thanks a lot!!!

--
Jan
www.limpens.com

Current Thread