
Calling a Template
When the same styling instructions are used at different places, group
them in a named template. For example, titles appear in the HTML title
and in the body of the document.
<xsl:template name=”title”>
<xsl:value-of select=”/article/title”/> (
<xsl:value-of select=”/article/date”/> )
</xsl:template>
<!-- ... -->
<P><B><xsl:call-template name=”title”/></B></P>
This simplifies maintenance because changes to the title are localized in a
single template.
xsl:include imports a style sheet into the current style sheet. The follow-
ing imports the core.xsl style sheet:
<xsl:include href=”core.xsl”/>
xsl:include must be a direct child of xsl:stylesheet ...