The following stylesheet doesn't produce the expected results, (the original
xml document is below).
All I get is:
<html>
<title></title>
<body></body>
</html>
<?xml version="1.0"?>
<xsl:transform version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method = "html" encoding="UTF-8" />
<xsl:template match="/">
<html>
<title>
<xsl:apply-templates select = "title" />
</title>
<body>
<xsl:apply-templates select = "item" />
</body>
</html>
</xsl:template>
<xsl:template match="title">
<xsl:value-of select="title" />
</xsl:template>
<xsl:template match="item">
<xsl:apply-templates select = "description" />
</xsl:template>
<xsl:template match="description">
<xsl:value-of select="description" />
</xsl:template>
</xsl:transform>
Source document:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<rss version="2.0">
<title>Test</title>
<item>
<description>Hi Guy</description>
<title>November 07, 2003</title>
</item>
</rss>