1)I have an XML file with the structure that I don’t want really change.
I’m using xslt to show my xml as html.
But I have some text on html-form depending on language, that is declared in xml. So I should dynamically choose the right language and depending on it show the right text.
Is it possible to declare constants in xslt and then choose the right one?
2)And another question.
I have
<meta http-equiv="Content-Type" content="text/html; charset=mycharSet" />
where mycharset is
<xsl:value-of select="root/CHARACTER_SET"/>
How can I insert this to meta tag?
Within the XSLT stylesheet declare global parameters e.g. :
or in xslt 2.0
<xsl:param name="lang" required="yes" as="xs:string"/>etc....
Then when calling your xslt pass the corresponding parameter and change the “text” depending on the value of the parameter :
Hope it helps.
Edit:
Regarding your second question :