?
=?ISO-8859-1?Q?Frederik_S=F8rensen?=
I include a xslt stylesheet with variables for all the error messages in
my system.
<xsl:variable name="Banner_error_1">
errormessage 1 for banner
</xsl:variable>
<xsl:variable name="Banner_error_2">
errormessage 2 for banner
</xsl:variable>
If my system finds an error it generates this xml
<error>
<nr>1</nr>
<plugin>Banner</plugin>
</error>
I would then like to select the variable based on my xml
something like
<xsl:value-of select="${plugin}_error_{nr}"/>
This should do the same as $$variable in php.
ie.
<?php
$foo = 'bar';
$bar = 'baz';
echo $$foo; // will echo 'baz'
?>
Is it at all possible to do this in xslt?
Or is there another way that i have not thought about?
I hope you can se the idea.
Frederik Sørensen
my system.
<xsl:variable name="Banner_error_1">
errormessage 1 for banner
</xsl:variable>
<xsl:variable name="Banner_error_2">
errormessage 2 for banner
</xsl:variable>
If my system finds an error it generates this xml
<error>
<nr>1</nr>
<plugin>Banner</plugin>
</error>
I would then like to select the variable based on my xml
something like
<xsl:value-of select="${plugin}_error_{nr}"/>
This should do the same as $$variable in php.
ie.
<?php
$foo = 'bar';
$bar = 'baz';
echo $$foo; // will echo 'baz'
?>
Is it at all possible to do this in xslt?
Or is there another way that i have not thought about?
I hope you can se the idea.
Frederik Sørensen