<?xml version="1.0" encoding="ISO-8859-1"?>

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="/">
	<html>
		<head>		
			<link href="style.css" rel="stylesheet" type="text/css" />
		</head>
		<body>
			<xsl:apply-templates />
		</body>
	</html>
</xsl:template>

<!-- The <article> tag -->
<xsl:template match="article">
	<div class="article-container">
		<!-- Show a standard header -->
		<div class="article-header">
			Here is the article header.
		</div>
		
		<!-- Apply templates to article content -->
		<xsl:apply-templates />
		
		<!-- Show a standard footer -->
		<div class="footer">
			Here is the page footer.
		</div>		
	</div>
</xsl:template>

<!-- The <section> tag -->
<xsl:template match="section">

	<div class="section">
		<hr/>
		<xsl:apply-templates />
	</div>
	
</xsl:template>

<!-- <text> container -->
<xsl:template match="text">
	<div class="text">
		<xsl:apply-templates />
	</div>
</xsl:template>

<!-- <code> container -->
<xsl:template match="code">

	<div class="code">
		<!-- ugh - substring() hack is to remove leading \n at start
			of code block. Without this hack, it looks okay when
			run through xsltproc, but has a gap when viewing the XML
			directly in Firefox.
		-->
		<pre><xsl:value-of select="substring(.,2)" /></pre></div>		
</xsl:template>

</xsl:stylesheet>



