> I don't want to repeat entire "AddViewParameter(..", instead to set a
variable in each xsl:when and finally produce my desired function...
Try something like this:
<xsl:variable name="foo" ><xsl:choose>
<xsl:when test="viewheaderparameter_id = 32000">param1,
param2</xsl:when>
<xsl:when test="viewheaderparameter_id = 32001">param1, param2,
param3</xsl:when>
</xsl:choose></xsl:variable>
AddViewParameter(0,viwsecPageContent,hdrprmPers onelId"<xsl:value-of
select="normalize-space( $foo )"/>", <xsl:value-of
select="viewparameter_flags"/> );
You can set the value of an XSL variable as often as you like, to as
many different values as you like. The trick is that each instance must
be within a different scope (effectively the XML nesting level within
your XSL stylesheet).
Note here that I've embedded the <xsl:choose> within the <xsl:variable>
This is because doing it the other way round would be a much more
obvious way to set the variable, but it would also limit its scope so
much that its value couldn't be accessed from outside the <xsl:choose>.