XSL reference documentation generated from the W3C Recommendation 16 November 1999
<apply-imports>
Model: EMPTY
</apply-imports>
A template rule that is being used to override a template rule in
an imported stylesheet (see conflict) can use the
xsl:apply-imports element to invoke the overridden
template rule.
xsl:for-each element is instantiated, the current
template rule becomes null for the instantiation of the content of the
xsl:for-each element.
xsl:apply-imports processes the current node using
only template rules that were imported into the stylesheet element
containing the current template rule; the node is processed in the
current template rule's mode. It is an error if
xsl:apply-imports is instantiated when the current
template rule is null.
For example, suppose the stylesheet doc.xsl contains a
template rule for example elements:
<xsl:template match="example"> <pre><xsl:apply-templates/></pre> </xsl:template>
Another stylesheet could import doc.xsl and modify the
treatment of example elements as follows:
<xsl:import href="doc.xsl"/>
<xsl:template match="example">
<div style="border: solid red">
<xsl:apply-imports/>
</div>
</xsl:template>
The combined effect would be to transform an example
into an element of the form:
<div style="border: solid red"><pre>...</pre></div>