Right there here is my next question.
We work with multilingual websites and use a variable within our CMS that contains all of the languages for the site. This is setup as en=English,fr=French,de=German and so on.
The current language is being stored within the variable $Lang.
I am putting this variable into an xml document like this:
list one
<SiteLanguages>
<Language>en</Language>
<Language>fr</Language>
<Language>de</Language>
</SiteLanguages>
Then within the generic document I have an element for all of the possible languages:
list two
<languages>
<language id="en">
<en>English</en>
<fr>French</fr>
<de>German</de>
</language>
<language id="de">
<en>English De</en>
<fr>French De</fr>
<de>German De</de>
</language>
<language id="fr">
<en>English Fr</en>
<fr>French Fr</fr>
<de>German Fr</de>
</language>
<language id="es">
<en>English es</en>
<fr>French es</fr>
<de>German es</de>
</language>
</languages>
What I want to be able to do, is to loop over the all of the elements in list one, and then output the long language from list two. So if the site is currently in french(fr), I need to output all of the nodes from list 2 where the id = fr. At the moment I have it so that it outputs all of the same node (English, English, English, English) using this:
<xsl:for-each select="//SiteLanguages/Language">
<input type="radio" name="Language" value="{.}" /><xsl:value-of select="//newsletter/languages/language[@id=$Lang]/fr" />
</xsl:for-each>
when i replace this hardcoded "fr" with . from the loop I get the whole list!
Any ideas
TIA
Tony