<?xml version="1.0" encoding="UTF-8" ?>

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/TR/WD-xsl">

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

<xsl:template match="Nocak">
<HTML>
<HEAD>
<TITLE>
<xsl:value-of select="@rocnik"/>. rocnik
</TITLE>
</HEAD>
<BODY>
<CENTER>
<H3>
NOP <xsl:value-of select="@rocnik"/>. rocnik <BR/>
Datum: <xsl:value-of select="@datum"/>
</H3>
</CENTER>
<xsl:apply-templates select="*"/>
</BODY>
</HTML>
</xsl:template>

<!-- Format ingredients -->
<xsl:template match="Kategorie">
<H4>Kategorie:</H4>
<table border="1">
	<tr><th>ID</th><th>Pokec</th></tr>
	<xsl:apply-templates select="//Kategoria"/>
</table>
</xsl:template>

<xsl:template match="Kategoria">
	<tr>
		<td> <xsl:value-of select="@id"/> </td>
		<td> <xsl:value-of select="."/> </td>
	</tr>
</xsl:template>

<xsl:template match="Posadky">
<H4>Posadky:</H4>
<table border="1">
	<tr><th>ID</th><th>Muzstvo</th><th>Kategoria</th><th>Kartecka</th>
   	<th>Cas 1</th><th>Cas 2</th><th>Poradie</th></tr>
	<xsl:apply-templates select="//Posadka"/>
</table>
</xsl:template>

<xsl:template match="Posadka">
	<tr>
		<td> <xsl:value-of select="@id"/> </td>
		<td> <xsl:value-of select="."/> </td>
		<td> <xsl:value-of select="@kategoria"/> </td>
		<td> <xsl:value-of select="@kartecka"/> </td>
		<td> <xsl:value-of select="@cas1"/> </td>
		<td> <xsl:value-of select="@cas2"/> </td>
		<td> <xsl:value-of select="@poradie"/> </td>
	</tr>
</xsl:template>


<!--
<TABLE BORDER="1">
<TR BGCOLOR="#308030"><TH>Qty</TH><TH>Units</TH><TH>Item</TH></TR>
<xsl:for-each select="id">
<TR>
-->
<!-- handle empty Qty elements separately -->
<!--
<xsl:if test='Qty[not(.="")]' >
<TD><xsl:value-of select="Qty"/></TD>
</xsl:if>
<xsl:if test='Qty[.=""]' >
<TD BGCOLOR="#404040"> </TD>
</xsl:if>
<TD><xsl:value-of select="Qty/@unit"/></TD>
<TD><xsl:value-of select="Item"/>
</TD>
</TR>
</xsl:for-each>
</TABLE>
</xsl:template>
-->
</xsl:stylesheet>


