can you call a template within a template? for example:
If I was wanting to use
<xsl:choose>
<xsl:when test="//*[local-name()='RetrieveCCTransRq']">
<xsl:call-template name="SOAPOutput"/>
</xsl:when>
</xsl:choose>
<xsl:template name="SOAPOutput">
<SOAP-ENV:Envelope>
<SOAP-ENV:Body>
<OutputPayload>
<TotalTransactions>
<xsl:value-of select="count(//Transaction)"/>
</TotalTransactions>
<Transactions>
<xsl:apply-templates/>
</Transactions>
</OutputPayload>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
<xsl:template match="Transaction">
<xsl:choose>
<xsl:when test="contains(Type,'Debit')">
<Debit>
<xsl:apply-templates select="Date"/>
<xsl:apply-templates select="PostDate"/>
<xsl:apply-templates select="Description"/>
<xsl:apply-templates select="Amount"/>
</Debit>
</xsl:when>
<xsl:otherwise>
<Credit>
<xsl:apply-templates select="Date"/>
<xsl:apply-templates select="PostDate"/>
<xsl:apply-templates select="Description"/>
<xsl:apply-templates select="Amount"/>
</Credit>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="Date">
<Date>
<xsl:value-of select="."/>
</Date>
</xsl:template>
<xsl:template match="PostDate">
<PostDate>
<xsl:value-of select="."/>
</PostDate>
</xsl:template>
<xsl:template match="Description">
<Description>
<xsl:value-of select="."/>
</Description>
</xsl:template>
<xsl:template match="Amount">
<Amount>
<xsl:value-of select="."/>
</Amount>
</xsl:template>
</xsl:template>