[Home] [By Thread] [By Date] [Recent Entries]
Manuel Souto Pico wrote:
Is it possible to run something like that using the param option (or, even better, to do it in the editor)? (in capitals for clarity) I think you should be able to pass in a string value as the parameter and then use the tokenize function to split it up into a sequence of lang values e.g. <xsl:param name="lang"/> <xsl:variable name="languages" select="tokenize($lang, ',')"/> <xsl:template match="xliff">
<xsl:copy>
<xsl:variable name="file" select="file"/>
<xsl:for-each select="$languages">
<xsl:apply-templates select="$file">
<xsl:with-param name="lang" select="."/>
</xsl:apply-templates>
</xsl:for-each>
</xsl:copy>
</xsl:template> <xsl:template match="file">
<xsl:param name="lang"/>
<xsl:copy>
<xsl:attribute name="lang" select="$lang"/>
<xsl:copy-of select="node()"/>
</xsl:copy>
</xsl:template>-- Martin Honnen http://msmvps.com/blogs/martin_honnen/
|

Cart



