<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/TR/xhtml1/strict">
	<xsl:import href="layout.xsl"/>
	<xsl:output method="xml" indent="yes" encoding="iso-8859-1"/>
	<!--  =========== lmml template (root) ================================= -->
	<xsl:template match="lmml">
		<html>
			<head>
				<title>
					<xsl:value-of select="section/@title"/>
				</title>
			</head>
			<body>
				<xsl:apply-templates/>
			</body>
		</html>
	</xsl:template>
	<!-- =========== section ================================-->
	<xsl:template match="lmml/section">
		<H3>
			<xsl:value-of select="@title"/>
			<br/>
		</H3>
		<xsl:apply-templates/>
	</xsl:template>
	<!-- nested section -->
	<xsl:template match="section/section">
		<xsl:choose>
			<xsl:when test="@uri">
				<a>
					<xsl:attribute name="target">contentframe</xsl:attribute>
					<xsl:attribute name="href"><xsl:value-of select="@uri"/></xsl:attribute>
					<xsl:value-of select="@title"/>
					<br/>
					<xsl:apply-templates/>
				</a>
			</xsl:when>
			<xsl:otherwise>
				<H4>
					<xsl:text> </xsl:text>
					<xsl:value-of select="@title"/>
				</H4>
				<xsl:apply-templates/>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<!--  =========== collection ================================-->
	<xsl:template match="collection">
		<xsl:choose>
			<xsl:when test="@type ='example'">
					
				</xsl:when>
			<xsl:when test="@uri">
				<a>
					<xsl:attribute name="target">contentframe</xsl:attribute>
					<xsl:attribute name="href"><xsl:value-of select="@uri"/></xsl:attribute>
					<H4>
						<xsl:value-of select="@title"/>
					</H4>
					<xsl:apply-templates/>
				</a>
			</xsl:when>
			<xsl:otherwise>
				<H4>
					<xsl:text>Anhang </xsl:text>
					<xsl:number level="multiple" count="collection" format="A"/>
					<xsl:text> </xsl:text>
					<xsl:value-of select="@title"/>
				</H4>
				<xsl:apply-templates/>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<!-- =========== glossary ================================-->
	<xsl:template match="glossary">
		<xsl:choose>
			<xsl:when test="@uri">
				<a>
					<xsl:attribute name="target">contentframe</xsl:attribute>
					<xsl:attribute name="href"><xsl:value-of select="@uri"/></xsl:attribute>
					<span style="font-size:14">
						<xsl:value-of select="@language"/>
					</span>
					<xsl:apply-templates/>
				</a><xsl:text>|</xsl:text>
			</xsl:when>
			<xsl:otherwise>
				<xsl:if test="@label">
					<a>
						<xsl:attribute name="name"><xsl:value-of select="@label"/></xsl:attribute>
					</a>
				</xsl:if>
				<span style="font-size:18">
						<xsl:value-of select="@title"/>:
					</span>
				<xsl:apply-templates/>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<!-- =========== bibliography ================================-->
	<xsl:template match="bibliography">
		<xsl:choose>
			<xsl:when test="@uri">
				<a>
					<xsl:attribute name="target">contentframe</xsl:attribute>
					<xsl:attribute name="href"><xsl:value-of select="@uri"/></xsl:attribute>
					<H4>
						Literatur
					</H4>
					<xsl:apply-templates/>
				</a>
			</xsl:when>
			<xsl:otherwise>
				<xsl:if test="@label">
					<a>
						<xsl:attribute name="name"><xsl:value-of select="@label"/></xsl:attribute>
					</a>
				</xsl:if>
				<h2>Literatur</h2>
				<xsl:for-each select="bibItem">
					<table width="100%" border="0">
						<tr>
							<td width="10%">
								<xsl:value-of select="@bibKey"/>
							</td>
							<td>
								<xsl:apply-templates/>
							</td>
						</tr>
					</table>
				</xsl:for-each>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
</xsl:stylesheet>

