xsl:apply-imports
Applies the template rule from an imported stylesheet that would have matched the current node, ignoring rules from the importing stylesheet.
<xsl:template match="title">
<h1 class="custom">
<xsl:apply-imports/>
</h1>
</xsl:template>This is similar to xsl:next-match, but only considers rules with lower import precedence (rules from imported stylesheets), not rules with merely lower priority in the same precedence level. Use it to override and extend templates from a base stylesheet you imported.
Attributes
None (apart from optional xsl:with-param children).
Example
Wrap the imported rendering of a section with extra metadata:
<xsl:import href="base.xsl"/>
<xsl:template match="section">
<section data-id="{@id}">
<xsl:apply-imports/>
</section>
</xsl:template>