xsl-list
[Top] [All Lists]

calling templates depending on content

2004-10-29 02:11:53
Hello!
At the moment I've got the following construct:

[...]
<xsl:template name="pages">
 <xsl:choose>
  <xsl:when test="/main/template/@name = 'start'">
   <xsl:call-template name="start"/>
  </xsl:when>
  <xsl:when test="/main/template/@name = 'query'">
   <xsl:call-template name="query"/>
  </xsl:when>
  ...
 </xsl:choose>
</xsl:template>
[...]

Is there a better way (XSL1.0) to call a template depending on 
"/main/template/@name"?

thanks,

 Stefan


<Prev in Thread] Current Thread [Next in Thread>