Nic Miloslav     Example 65    KEYWORDS      EXAMPLES      AUTHORS     

Stylesheet 3 imports Stylesheet 2 and Stylesheet 2 imports Stylesheet 1.


     XML     HOME     XSL 1     XSL 2     XSL 3      
<xslTutorial >
<AAA>red</AAA>
<BBB>blue</BBB>
<CCC>purple</CCC>
</xslTutorial>

     XSL 1     HOME     XML     HTML 1     OUTPUT 1     
<xsl:stylesheet version='1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
<xsl:template match="AAA">
<H1 style="color:{.}">
<xsl:value-of select="."/>
</H1>
</xsl:template>
</xsl:stylesheet>

     HTML 1     HOME     XML     XSL 1     OUTPUT 1     
<H1 style="color:red">red</H1> blue purple

     OUTPUT 1     HOME     XML     XSL 1     HTML 1     

red

blue purple

     XSL 2     HOME     XML     HTML 2     OUTPUT 2     
<xsl:stylesheet version='1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
<xsl:import href="id2.xsl"/>
<xsl:template match="BBB">
<H2 style="color:{.}">
<xsl:value-of select="."/>
</H2>
</xsl:template>
</xsl:stylesheet>

     HTML 2     HOME     XML     XSL 2     OUTPUT 2     
<H1 style="color:red">red</H1>
<H2 style="color:blue">blue</H2> purple

     OUTPUT 2     HOME     XML     XSL 2     HTML 2     

red

blue

purple

     XSL 3     HOME     XML     HTML 3     OUTPUT 3     
<xsl:stylesheet version='1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
<xsl:include href="id3.xsl"/>
<xsl:template match="CCC">
<H3 style="color:{.}">
<xsl:value-of select="."/>
</H3>
</xsl:template>
</xsl:stylesheet>

     HTML 3     HOME     XML     XSL 3     OUTPUT 3     
<H1 style="color:red">red</H1>
<H2 style="color:blue">blue</H2>
<H3 style="color:purple">purple</H3>

     OUTPUT 3     HOME     XML     XSL 3     HTML 3     

red

blue

purple