I use xslt 2.0. I have a parameter named "N" which has an integer value.
Eg: <xsl:param name="N" select="5">
Now I want to define "N" number of parameters which are as follows:
<xsl:param name="car1"/>
<xsl:param name="car2"/>
<xsl:param name="car3"/> and so on...till
<xsl:param name="carN"/>
So in this example since the value of N is 5, I want to create the following parameters:
<xsl:param name="car1"/>
<xsl:param name="car2"/>
<xsl:param name="car3"/>
<xsl:param name="car4"/>
<xsl:param name="car5"/>
The number of parameters must be generated dynamically based on value "N" and not hard coded in xsl.Also even I can use xslt 1.0 if this situation demands to use it. I may also pass the N value from java using
transformer.setparameter("N","5");
No comments:
Post a Comment