0

can we call custom template from inside xsl:if block in xslt 1.0 as I have done below.. i have called a custom template named abcCodetemplate as shown below from inside xsl:if block please advise is it correct approach..

<xsl:if test="$TSS='true'">
          <xsl:variable name="abcCode">
          <xsl:call-template name="abcCodetemplate">
          <xsl:with-param name="Var" select="/ase/*/rty"/> 
           </xsl:call-template> 
         </xsl:variable>

    </xsl:if>
</xsl:template>

1 Answers1

0

Yes, it is a correct approach. But if it's possible use <xsl:apply-template>
take a look here What are the differences between 'call-template' and 'apply-templates' in XSL?

Community
  • 1
  • 1
Coder
  • 886
  • 1
  • 12
  • 28