-Another template example
-<!-- put the current
session ID in to the URL -->
–<xsl:template
name="addSessionToURL">
– <xsl:choose>
– <!-- if sending an email get new
session -->
– <xsl:when
test="/searchresponse/sendingemail = $true">
– <xsl:text>session=new</xsl:text>
– </xsl:when>
– <!-- if not sending an email preserve session ID
-->
– <xsl:otherwise>
– <xsl:text>session=</xsl:text>
– <xsl:value-of
select="/searchresponse/session"/>
– </xsl:otherwise>
– </xsl:choose>
–</xsl:template>
–
–Output of <xsl:call-template name=“addSessionToURL”/>
•As part of an email: session=new
•All other situations: session=106W6250V8X87.3594