<xslTutorial creator="nicmila@idoox.com">
<index keywords='xsl:include xsl:import xsl:apply-imports'/>

<description>You can use xsl:apply-imports element to get information from an imported template, whose behaviour you are changing. <stylesheet id='id3'/> imports <stylesheet id='id2'/> and overrides its template. <stylesheet id='id4'/> imports <stylesheet id='id2'/> and changes its template. xsl-apply-imports works only for templates imported with xsl:import, not for templates included with xsl:include.(<stylesheet id='id5'/>
</description>

<xmlSource id="id1">
<AAA/>
<BBB/>
<CCC/>
</xmlSource>

<attValues>
<value match=''></value>
</attValues>

<xslStylesheet id="id2">
<xsl:template match="/*/*">
<DIV style="color:red">
<xsl:value-of select="name()"/>
</DIV>
</xsl:template>
</xslStylesheet>

<xslStylesheet id="id3">
<xsl:import href="id2.xsl"/>

<xsl:template match="/*/*">
<EM>
<xsl:value-of select="name()"/>
</EM>
</xsl:template>
</xslStylesheet>

<xslStylesheet id="id4">
<xsl:import href="id2.xsl"/>

<xsl:template match="/*/*">
<EM>
<xsl:apply-imports/>
</EM>
</xsl:template>
</xslStylesheet>

<xslStylesheet id="id5">
<xsl:include href="id2.xsl"/>

<xsl:template match="/*/*">
<EM>
<xsl:apply-imports/>
</EM>
</xsl:template>
</xslStylesheet>

</xslTutorial>