<xsl:apply-imports> Element
Invokes an overridden template rule defined in an imported style sheet.
<xsl:apply-imports />
Element Information
Number of occurrences |
Unlimited |
Parent elements |
xsl:attribute, xsl:comment, xsl:copy, xsl:element, xsl:fallback, xsl:for-each, xsl:if, xsl:message, xsl:otherwise, xsl:param, xsl:processing-instruction, xsl:template, xsl:variable, xsl:when, xsl:with-param, outputelements |
Child elements |
(No child elements) |
Remarks
A template rule that is being used to override a template rule in an imported style sheet can use the <xsl:apply-imports>
element to invoke the overridden template rule.
At any point in the processing of a style sheet, there is a current template rule. When a template rule is chosen by matching a pattern, it becomes the current template rule until its template has been instantiated. When an <xsl:for-each>
element is instantiated, the current template rule becomes null while the <xsl:for-each>
element is applied to each element in the source document.
The <xsl:apply-imports>
element processes the current node using only template rules that were imported into the style sheet element that contains 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.
This section contains the following examples.