<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"/>

<xsl:template match="/">
	<html>
		<head>
			<link rel="icon" href="favicon.ico" type="image/ico"/>
			<meta name="Author" content="Norbert Tretkowski"/>
			<meta http-equiv="content-type" content="text/html; charset=iso-8859-1"/>
			<meta name="keywords" content="debian backports"/>
			<meta name="description" content="debian backports"/>

			<title>
				<xsl:value-of select='homepage/title'/>
			</title>
		</head>

		<body text="#000000" bgcolor="#FFFFFF" link="#0000FF" vlink="#800080" alink="#FF0000">
			<table border="0" cellpadding="0" cellspacing="0" width="100%"><xsl:call-template name='content'/></table>
		</body>
	</html>
</xsl:template>

<xsl:template match="homepage/title">
	<!-- Do nothing, mkay? -->
</xsl:template>

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

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

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

<xsl:template match="link">
	<a>
		<xsl:attribute name='href'><xsl:value-of select='@file'/>.html</xsl:attribute>
		<xsl:apply-templates/>
	</a>
</xsl:template>

<xsl:template match="url">
	<a>
		<xsl:choose>
			<xsl:when test='@link'>
				<xsl:attribute name='href'><xsl:value-of select='@link'/></xsl:attribute>
			</xsl:when>
			<xsl:otherwise>
				<xsl:attribute name='href'><xsl:value-of select='.'/></xsl:attribute>
			</xsl:otherwise>
		</xsl:choose>
		<xsl:apply-templates/>
	</a>
</xsl:template>

<xsl:template match="list">
	<ul>
		<xsl:for-each select="li">
			<li>
				<xsl:apply-templates/>
			</li>
		</xsl:for-each>
	</ul>
</xsl:template>


<!-- stuff for changelog
     -->
<xsl:template match="changelog">
	<xsl:param name="maximum"/>
	<xsl:variable name="iteration" select="number(0)" />

	<xsl:call-template name="do.changelog">
		<xsl:with-param name="maximum" select="$maximum + 1"/>
		<xsl:with-param name="iteration" select="$iteration"/>
	</xsl:call-template>
</xsl:template>
	
<xsl:template name="do.changelog">
	<xsl:param name="maximum"/>
	<xsl:param name="iteration"/>

	<xsl:if test="$iteration &lt; $maximum">
		<xsl:variable name="node" select="clset[$iteration]"/>
		<xsl:apply-templates select="$node"/>
		<xsl:call-template name="do.changelog">
			<xsl:with-param name="maximum" select="$maximum"/>
			<xsl:with-param name="iteration" select="$iteration + 1"/>
		</xsl:call-template>
	</xsl:if>
</xsl:template>

<xsl:template match="clset">
	<p>
	<i><xsl:value-of select="date" /></i>
	<ul>
		<xsl:for-each select="entry">
			<li>
				<xsl:choose>
					<xsl:when test="child::critical">
						<font color="red">
							<xsl:value-of select="."/>
						</font>
					</xsl:when>
					<xsl:otherwise>
						<xsl:value-of select="."/>
					</xsl:otherwise>
				</xsl:choose>
			</li>
		</xsl:for-each>
	</ul>
	</p>
</xsl:template>

<xsl:template match="critical">
        <font style='color: red'>
	    <xsl:apply-templates />
	</font>
</xsl:template>


<!-- News Templates
     <news><date>datum</date><body>newstext</body></news>
     -->
<xsl:template match="news/date">
	<br />
	<i><xsl:apply-templates/></i>
	<br />
</xsl:template>

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

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



<!-- we even do some lame includes.
     Yea.
     -->
<xsl:template match="include">
	<xsl:if test="@type='changelog'">
		<xsl:apply-templates select="document(@file)//changelog">
			<xsl:with-param name="maximum" select="number(@max)"/>
		</xsl:apply-templates>
	</xsl:if>
</xsl:template>


<!-- menu.
     -->

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

<xsl:template match="menu/content">
	<p style='margin-left: 10px'><small>
		<xsl:apply-templates />
	</small></p>
</xsl:template>


<!-- tags from html, more or less.
     -->
<xsl:template match="BR">
	<BR />
</xsl:template>

<xsl:template match="line">
	<hr height='1'/>
</xsl:template>

<xsl:template match="raw">
	<xsl:copy-of select="."/>
</xsl:template>

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

<!-- blog :))
     -->

<xsl:template match='blog/entry'>
	<i><xsl:value-of select='date'/></i><br />
	<div style='margin-left: 40px;'><xsl:apply-templates select='desc'/></div>
	<line/><p/>
</xsl:template>

<!-- header and footer
     -->

<xsl:template name='content'>
	<tr bgcolor="#DF0451">
		<td style='vertical-align: top;' width="15%" align="left"><img alt="" src="./images/corner-upperleft-df0451.png" border="0" hspace="0" vspace="0" width="16" height="16"/></td>
		<td></td>
		<td style='vertical-align: middle;'>
		<font size="+2" face="Helvetica,Arial" color="#ffffff">
			<b><xsl:value-of select='/homepage/title'/></b>
		</font>
		</td>
		<td align="right">
			<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="">
				<tr>
					<td align="right" style='vertical-align: top'><img alt="" src="./images/corner-upperright-df0451.png" border="0" hspace="0" vspace="0" width="16" height="16"/></td>
				</tr>
				<tr>
					<td align="right"><img alt="" style='vertical-align: bottom' src="./images/corner-lowerright-df0451.png" border="0" hspace="0" vspace="0" width="16" height="16"/></td>

				</tr>
			</table>
		</td>
	</tr>
	<tr>
		<td bgcolor="#DF0451"></td>
		<td align="left" style='vertical-align: top' bgcolor="#ffffff"><img alt="" src="./images/corner-innerupperleft-df0451.png" border="0" hspace="0" vspace="0" width="16" height="16"/></td>
		<td colspan="2"></td>
	</tr>

	<tr>
		<td bgcolor="#DF0451">
			<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="">
				<tr>
					<td align="left"><img alt="" style='vertical-align:bottom' src="./images/corner-lowerleft-df0451.png" border="0" hspace="0" vspace="0" width="16" height="16"/></td>
					<td align="right" style='vertical-align: bottom'><img alt="" style='vertical-align:bottom' src="./images/corner-lowerright-df0451.png" border="0" hspace="0" vspace="0" width="16" height="16"/></td>
				</tr>
			</table>
		</td>

		<td rowspan="3"></td>
		<td></td>
		<td rowspan="3"></td>
	</tr>

	<TR valign="top">
			<TD bgcolor="#FFFFFF"><BR /><TABLE width="100%" border="0" cellpadding="0" cellspacing="0">
					<TR bgcolor="#eeeeee" valign="top">
						<TD align="left"  valign="top"><img alt="" src='images/corner-upperleft-eeeeee.png'/></TD>
						<TD></TD>
						<TD align="right"  valign="top"><img alt="" src='images/corner-upperright-eeeeee.png'/></TD>
					</TR>
					<TR bgcolor="#eeeeee">
						<TD></TD>
						<TD>
        <b>
                <a href="/">Home</a>
        </b>

        <p style="margin-left: 10px"><small>
                <a href="changelog.html">Changelog</a><BR />
                <a href="warnings.html">Warnings</a><BR />
                <a href="installation.html">Installation</a><BR />
                <a href="problems.html">Problems</a><BR />
                <a href="/debian/dists/stable">Packages</a><BR />
                <a href="contribute.html">Contribute</a><BR />
				<a href="tools/">Tools</a><BR />
                <a href="http://lists.backports.org/">Mailinglist</a><BR />
                <a href="mirrors.html">Mirrors</a><BR />
                <a href="todo.html">ToDo List</a><BR />
        </small></p>

        <b>
                Documentation
        </b>

        <p style="margin-left: 10px"><small>
                <a href="not_finished_yet.html">FAQ</a><BR />
                <a href="not_finished_yet.html">HOWTO</a><BR />
        </small></p>

        <b>
                Miscellaneous
        </b>

        <p style="margin-left: 10px"><small>
                <a href="stats/">Stats</a><BR />
                <a href="license.html">Copyright</a><BR />
                <a href="credits.html">Credits</a><BR />
                <a href="mailto:tretkowski@inittab.de">Feedback</a><BR />
        </small></p>

        <b>
                Search
        </b>

		<p/>

        <form action="package.php" method="get" target="_self">
                <input type="text" name="search" value="" size="12"/>
        </form>

						</TD>
						<TD></TD>
					</TR>
					<TR bgcolor="#eeeeee" style='vertical-align: bottom'>
						<TD align="left"  style="vertical-align: bottom"><img alt="" style='vertical-align:bottom' src='images/corner-lowerleft-eeeeee.png'/></TD>
						<TD></TD>
						<TD align="right"  style="vertical-align: bottom"><img alt="" style='vertical-align:bottom' src='images/corner-lowerright-eeeeee.png'/></TD>
					</TR><BR /></TABLE><TABLE width="100%" border="0" cellpadding="0" cellspacing="0" summary="">
					<TR>
						<TD align="center"><br /><a href="http://www.paypal.com/affil/pal=tretkowski%40inittab.de"><img src="https://www.paypal.com/images/x-click-but04.gif" border="0" alt="Support backports.org"/></a></TD>
					</TR>
					<TR>
						<TD align="center"><br /><a href="http://www.teamix.net/"><img src="http://www.backports.org/icon/teamix.png" border="0" alt="team(ix) GmbH"/></a><br/>(primary sponsor)</TD>
					</TR>
					<TR>
						<TD align="center"><br /><a href="http://www.n-ix.net/"><img src="http://www.backports.org/icon/n-ix.jpg" border="0" alt="N-IX Connected Service"/></a></TD>
					</TR>
				</TABLE><BR /></TD>
			<TD>
				<FONT face="Helvetica,Arial" color="#000000">
					<xsl:apply-templates/>
				</FONT>
			</TD>
		</TR>

		<TR valign="top">
			<TD bgcolor="#BBDDFF"><TABLE width="100%" border="0" cellpadding="0" cellspacing="0">
					<TR valign="top">
						<TD align="left"  valign="top"><img alt="" src='images/corner-upperleft-bbddff.png'/></TD>
						<TD align="right" valign="top"><img alt="" src='images/corner-upperright-bbddff.png'/></TD>
					</TR>
				</TABLE></TD>
			<TD> </TD>
		</TR>

		<TR>
			<TD bgcolor="#BBDDFF"> </TD>
			<TD align="left" style="vertical-align: bottom" bgcolor="#ffffff"><img alt="" style='vertical-align:bottom' src='images/corner-innerlowerleft-bbddff.png'/></TD>
			<TD colspan="2"> </TD>
		</TR>

		<TR bgcolor="#BBDDFF">
			<TD width="15%" style="vertical-align: bottom" align="left"><img alt="" style='vertical-align:bottom' src='images/corner-lowerleft-bbddff.png'/></TD>
			<TD> </TD>
			<TD align="right">
				<FONT color="#DF0451">
				</FONT>
			</TD>
			<TD align="right"><TABLE width="100%" border="0" cellpadding="0" cellspacing="0">
					<TR>
						<TD align="right" style="vertical-align: top"><img alt="" src='images/corner-upperright-bbddff.png'/></TD>
					</TR>
					<TR>
						<TD align="right" style="vertical-align: bottom"><img alt="" style='vertical-align:bottom' src='images/corner-lowerright-bbddff.png'/></TD>
					</TR>
				</TABLE></TD>
		</TR>
</xsl:template>

</xsl:stylesheet>

