S
systemutvecklare
Hi!
I have an application that generates an html-form from an xml-file
using an xsl-file. My problem is that I want the xsl to use some
"unknown" parameters that I pass to the xslt processor before
processing the xml. The parameters are not totally unknown but they are
not static, they are built by an attribute in the xml and a constant
name.
Is it possible to define a "runtime" parameter and use the value passed
to the xslt processor?
xsl example:
.... begin code ...
<!-- BUILD PARAMETER NAME -->
<xsl:variable name="param_name"><xsl:value-of
select="@name"/>_T</xsl:variable>
<!-- DEFINE PARAMETER -->
<xslaram name="$param_name"/>
<!-- USE PARAMETER -->
<xsl:if test="$param_name = 'some_value'">do something</xsl:if>
.... end code ...
Any other solution to this problem is appreciated
Thanx!
/Andreas
I have an application that generates an html-form from an xml-file
using an xsl-file. My problem is that I want the xsl to use some
"unknown" parameters that I pass to the xslt processor before
processing the xml. The parameters are not totally unknown but they are
not static, they are built by an attribute in the xml and a constant
name.
Is it possible to define a "runtime" parameter and use the value passed
to the xslt processor?
xsl example:
.... begin code ...
<!-- BUILD PARAMETER NAME -->
<xsl:variable name="param_name"><xsl:value-of
select="@name"/>_T</xsl:variable>
<!-- DEFINE PARAMETER -->
<xslaram name="$param_name"/>
<!-- USE PARAMETER -->
<xsl:if test="$param_name = 'some_value'">do something</xsl:if>
.... end code ...
Any other solution to this problem is appreciated
Thanx!
/Andreas