I call a template like this:
<xsl:call-template name="trip_form">
<xsl:with-param name="header" select="'Spara din resa'" />
<xsl:with-param name="size" select="'savetrip'" />
</xsl:call-template>
The templte looks like this:
<xsl:template name="trip_form">
<xsl:param name="type" />
<xsl:param name="size" />
<xsl:param name="header" />
<xsl:if test="type = ''">
<xsl:if test="/root/meta/url_params/has_car = 1">
<xsl:with-param name="'type'" select="'driver'" />
</xsl:if>
<xsl:if test="/root/meta/url_params/has_car = 0">
<xsl:variable name="'type'" select="'passenger'" />
</xsl:if>
</xsl:if>
etc...
When I specify the $type variable whilst calling the template, I want to use that value, but when I don't I want to check the Url_params/has_car node and set the variable accordingly, how do I do this?