
A Simple Style Sheet
The first goal is to convert the XML document into HTML. The style sheet
in Listing 5.2 is an example of how to do it.
Listing 5.2: XSLT Style Sheet to Convert the Article in HTML
<?xml version=”1.0” encoding=”ISO-8859-1”?>
<xsl:stylesheet
xmlns:xsl=”http://www.w3.org/1999/XSL/Transform”
xmlns=”http://www.w3.org/TR/REC-html40”>
<xsl:output method=”html”/>
<xsl:template match=”/”>
<HTML>
<HEAD>
<TITLE>Pineapplesoft Link</TITLE>
</HEAD>
<BODY>
<xsl:apply-templates/>
</BODY>
</HTML>
</xsl:template>
<xsl:template match=”section/title”>
<P><I><xsl:apply-templates/></I></P>
</xsl:template>
<xsl:template match=”article/title”>
<P><B><xsl:apply-templates/></B></P> ...