xsl:apply-imports

only for RuBoard

xsl: apply-imports

xsl:apply-imports invokes an overridden template rule in an imported stylesheet.

A template rule that's being used to override a template rule in an imported stylesheet can use the xsl:apply-imports element to invoke the overridden template rule.

At any point in the processing of a stylesheet, a current template rule exists. Whenever a template rule is chosen by matching a pattern, the template rule becomes the current template rule for the instantiation of the rule's template. When an 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.

Attributes

None.

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 shown here:

 <xsl:import href="doc.xsl"/>  <xsl:template match="example">    <div style="border: solid red">       <xsl:apply-imports/>    </div>  </xsl:template> 

Parent Elements

 xsl:attribute, xsl:comment, xsl:copy, xsl:element, xsl:for-each, xsl:if,  xsl:otherwise, xsl:param, xsl:processing-instruction, xsl:template,  xsl:variable, xsl:when, xsl:with-param, output elements 

Child Elements

None.

only for RuBoard


XML and ASP. NET
XML and ASP.NET
ISBN: B000H2MXOM
EAN: N/A
Year: 2005
Pages: 184

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net