Nic Miloslav     Example 1    KEYWORDS      EXAMPLES      AUTHORS     

With XSL you can freely modify any source text. Stylesheet 1 and Stylesheet 2 produce different output from the same source file.


     XML     HOME     XSL 1     XSL 2      
<xslTutorial >
<title>XSL</title>
<author>John Smith</author>
</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="/">
<H1><xsl:value-of select="//title"/></H1>
<H2><xsl:value-of select="//author"/></H2>
</xsl:template>
</xsl:stylesheet>

     HTML 1     HOME     XML     XSL 1     OUTPUT 1     
<HTML>
<HEAD> </HEAD>
<BODY>
<H1>XSL</H1>
<H2>John Smith</H2> </BODY> </HTML>

     OUTPUT 1     HOME     XML     XSL 1     HTML 1     

XSL

John Smith


     XSL 2     HOME     XML     HTML 2     OUTPUT 2     
<xsl:stylesheet version='1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform' >
<xsl:template match="/">
<H2><xsl:value-of select="//author"/></H2>
<H1><xsl:value-of select="//title"/></H1>
</xsl:template>
</xsl:stylesheet>

     HTML 2     HOME     XML     XSL 2     OUTPUT 2     
<HTML>
<HEAD> </HEAD>
<BODY>
<H2>John Smith</H2>
<H1>XSL</H1> </BODY> </HTML>

     OUTPUT 2     HOME     XML     XSL 2     HTML 2     

John Smith

XSL