Hi,
I am trying to write an XSL file that will be used on a multilingual website. I am passing a param into the XSL that identifies the language, this is called lang and can contain en,cy,es,fr,de etc.
I then have an XML document that I want to pull the language specific element from. the document looks like this:
<parent>
<element>
<en>test</en>
<es>test es</es>
<fr>test fr</fr>
</element>
</parent>
So I have been trying to use the following:
<xsl:stylesheet version="1.0" xmlns:xsl=" <xsl
aram name="Lang" />
<xsl
utput method="xhtml"/>
<xsl:template match="/">
<xsl:value-of select="//newsletter/name/$Lang" />
</xsl:template>
</xsl:stylesheet>
I have tried:
//newsletter/name/[$Lang]
//newsletter/name/{$Lang}
//newsletter/name/($Lang)
any ideas of how I can get this working?
TIA
Tony
I am trying to write an XSL file that will be used on a multilingual website. I am passing a param into the XSL that identifies the language, this is called lang and can contain en,cy,es,fr,de etc.
I then have an XML document that I want to pull the language specific element from. the document looks like this:
<parent>
<element>
<en>test</en>
<es>test es</es>
<fr>test fr</fr>
</element>
</parent>
So I have been trying to use the following:
<xsl:stylesheet version="1.0" xmlns:xsl=" <xsl
<xsl
<xsl:template match="/">
<xsl:value-of select="//newsletter/name/$Lang" />
</xsl:template>
</xsl:stylesheet>
I have tried:
//newsletter/name/[$Lang]
//newsletter/name/{$Lang}
//newsletter/name/($Lang)
any ideas of how I can get this working?
TIA
Tony