|
Subject: [xsl] passing coma separated values as params From: "Jan Limpens" <jan@xxxxxxxxxxx> Date: Thu, 23 Nov 2006 22:05:30 -0200 |
<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>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.
-- Jan www.limpens.com
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] using copy-of and substri, David Carlisle | Thread | [xsl] Re: passing coma separated va, Jan Limpens |
| RE: [xsl] Standards checkers for XS, Michael Kay | Date | [xsl] Re: passing coma separated va, Jan Limpens |
| Month |