Applying Style

Suppose that you have a stylesheet which customizes another stylesheet, perhaps changing the formatting of a few elements. Suppose that one of these elements is formatted by a complex template in the base stylesheet, and all you want to change is one small, special case. How can you do this?

The answer is with <xsl:apply-imports>:

<xsl:import href="basestyle.xsl"/>
<xsl:template match="table">
    <xsl:when test="@role='something-special'">
      <xsl:call-template name="special-table-handler"/>