Elemen <xsl:call-template> XSLT

Definisi dan Penggunaan

Elemen <xsl:call-template> boleh memanggil template yang ditentukan.

Syarat

<xsl:call-template name="templatename">
  <!-- Content:xsl:with-param* -->
</xsl:call-template>

Atribut

Atribut Nilai Deskripsi
name templatename Wajib. Tentukan nama template yang dipanggil.

Contoh

Contoh 1

Ketika proses menemui elemen car, panggil template yang dinamakan "description":

<xsl:template match="car">
  <xsl:call-template name="description"/>
</xsl:template>