Use a variable as a part of an XPath?
Hi there,
I'm struggeling with a basic problem. This is my xml:
<Demo>
<NextDay>
<German>morgen</German>
<English>tomorrow</English>
<Italian>domani</Italian>
</NextDay>
</Demo>
I would like to extract the value based on a variable (or a parameter to be more precise).
<xsl:variable name="lang" select="'Italian'" />
....
<xsl:template match="NextDay">
<xsl:parameter name="curLang" />
AND HERE I GOT STUCK: <xsl:value-of select="?????" />
<xsl:template>
I tried $curLang, '$curLang', '{$curLang}', {$curLang}
It's a standard problem, so it looks to me.. replace part of an XPath with a variable name. What am I missing out?
:( stw
If you think education is expensive - try ignorance!
__________________
If you think education is expensive - try ignorance!
|