| Nic Miloslav Example 6 | KEYWORDS EXAMPLES AUTHORS |
|---|
An XSL processors parses an XML source and tries to find a matching template rule. If it does, instructions inside matching template are evaluated.
| XML | HOME XSL 1 |
|---|
| <xslTutorial > |
| <bold>Hello, world.</bold> |
| <red>I am </red> |
| <italic>fine.</italic> |
| </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="bold"> |
| <P><B><xsl:value-of select="."/></B></P> |
| </xsl:template> |
| <xsl:template match="red"> |
| <P style="color:red"><xsl:value-of select="."/></P> |
| </xsl:template> |
| <xsl:template match="italic"> |
| <P><i><xsl:value-of select="."/></i></P> |
| </xsl:template> |
| </xsl:stylesheet> |
| HTML 1 | HOME XML XSL 1 OUTPUT 1 |
|---|
| <P> |
| <B>Hello, world.</B></P> |
| <P style="color:red">I am </P> |
| <P> |
| <i>fine.</i></P> |
| OUTPUT 1 | HOME XML XSL 1 HTML 1 |
|---|
Hello, world.
I am
fine.