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

<description>Other stylesheets can be imported (xsl:import) or included (xsl:include) into a stylesheet..  Importing a stylesheet is the same as including it  except that definitions and template rules in the importing stylesheet take precedence over template rules and definitions in the imported stylesheet.<stylesheet id='id2'/> and <stylesheet id='id3'/> are imported or included into remaining xtylesheets. (NOTE: did XT right job with <stylesheet id='id10'/>? SPEC: The xsl:import element children must precede all other element children of an xsl:stylesheet element, including any xsl:include element children. When xsl:include is used to include a stylesheet, any xsl:import elements in the included document are moved up in the including document to after any existing xsl:import elements in the including document.)
</description>

<xmlSource id="id1">
<H1>IMPORTING STYLESHEETS</H1>
</xmlSource>

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

<xslStylesheet id="id2">
<xsl:variable name="id2">Stylesheet 1(id2.xsl)</xsl:variable>
<xsl:variable name="t">Variable t from id2.xsl</xsl:variable>
</xslStylesheet>

<xslStylesheet id="id3">
<xsl:variable name="id3">Stylesheet 2(id3.xsl)</xsl:variable>
<xsl:variable name="t">Variable t from id3.xsl</xsl:variable>
</xslStylesheet>

<xslStylesheet id="id4">
<xsl:include href="id2.xsl"/>
<xsl:import href="id3.xsl"/>
<xsl:template match="/">
<P><xsl:value-of select="$id2"/></P>
<P><xsl:value-of select="$id3"/></P>
</xsl:template>
</xslStylesheet>

<xslStylesheet id="id5">
<xsl:include href="id2.xsl"/>
<xsl:include href="id3.xsl"/>
<xsl:template match="/">
<P><xsl:value-of select="$id2"/></P>
<P><xsl:value-of select="$id3"/></P>
<P><xsl:value-of select="$t"/></P>
</xsl:template>
</xslStylesheet>

<xslStylesheet id="id6">
<xsl:include href="id3.xsl"/>
<xsl:include href="id2.xsl"/>
<xsl:template match="/">
<P><xsl:value-of select="$id2"/></P>
<P><xsl:value-of select="$id3"/></P>
<P><xsl:value-of select="$t"/></P>
</xsl:template>
</xslStylesheet>

<xslStylesheet id="id7">
<xsl:import href="id2.xsl"/>
<xsl:import href="id3.xsl"/>
<xsl:template match="/">
<P><xsl:value-of select="$id2"/></P>
<P><xsl:value-of select="$id3"/></P>
<P><xsl:value-of select="$t"/></P>
</xsl:template>
</xslStylesheet>

<xslStylesheet id="id8">
<xsl:import href="id3.xsl"/>
<xsl:import href="id2.xsl"/>
<xsl:template match="/">
<P><xsl:value-of select="$id2"/></P>
<P><xsl:value-of select="$id3"/></P>
<P><xsl:value-of select="$t"/></P>
</xsl:template>
</xslStylesheet>

<xslStylesheet id="id9">
<xsl:import href="id3.xsl"/>
<xsl:include href="id2.xsl"/>
<xsl:template match="/">
<P><xsl:value-of select="$id2"/></P>
<P><xsl:value-of select="$id3"/></P>
<P><xsl:value-of select="$t"/></P>
</xsl:template>
</xslStylesheet>

<xslStylesheet id="id10">
<xsl:include href="id2.xsl"/>
<xsl:import href="id3.xsl"/>
<xsl:template match="/">
<P><xsl:value-of select="$id2"/></P>
<P><xsl:value-of select="$id3"/></P>
<P><xsl:value-of select="$t"/></P>
</xsl:template>
</xslStylesheet>

</xslTutorial>