<?xml version="1.0" encoding="iso-8859-1" standalone="yes"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
		version="1.0">

<xsl:output method="html"/>

<xsl:template match='/'>
	<html>
	<head>
	<title>
		<xsl:value-of select="/abschnitt/ueberschrift/text()"/>
	</title>
	</head>
	<body>
		<xsl:apply-templates select="*"/>
	</body>
	</html>
</xsl:template>

<xsl:template match="abschnitt">
        <xsl:apply-templates select="*"/>
</xsl:template>

<xsl:template match="ueberschrift">
	<h1>
	<xsl:apply-templates select="*|text()"/>
	</h1>
</xsl:template>

<xsl:template match="text()">
	<xsl:value-of select="."/>
</xsl:template>

<xsl:template match="/abschnitt/abschnitt[@FileID='BD311w.xml']">
	<table>
		<xsl:apply-templates select="wert">
			  <xsl:sort select="code"/>
		</xsl:apply-templates> 
	</table>
</xsl:template>

<xsl:template match="wert">
	<tr>
	<td>
		<xsl:apply-templates select="code/*|code/text()"/>
	</td>
	<td>=</td>
	<td>
		<xsl:apply-templates select="beschreibung/*|beschreibung/text()"/>
	</td>
	</tr>
</xsl:template>

<xsl:template match="p|b">
	<xsl:copy>
		<xsl:apply-templates select="*|text()"/>
	</xsl:copy>
</xsl:template>

</xsl:stylesheet>

