<?xml version="1.0" ?>
<!-- Dateiname: xmlsamplelist.xsl -->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="books">
	<TABLE>
		<COLGROUP>
			<COL STYLE="width: 40px; text-align: right;" />
			<COL STYLE="width: 100px; " />
			<COL STYLE="width: 250px; " />
			<COL STYLE="width: 100px; " />
			<COL STYLE="width: 70px; text-align: right;" />
		</COLGROUP>
		<xsl:apply-templates select="book">
			<xsl:sort select="" data-type="" order="" />
		</xsl:apply-templates>
	</TABLE>
</xsl:template>

<xsl:template match="book">
	<TR>
		<xsl:choose>
			<xsl:when test="position() mod 2 = 1">
		  		<xsl:attribute name="class">
					<xsl:value-of select="'one'" />
				</xsl:attribute>
			</xsl:when>
			<xsl:otherwise>
		  		<xsl:attribute name="class">
					<xsl:value-of select="'two'" />
				</xsl:attribute>
			</xsl:otherwise>
		</xsl:choose>
		<TD>
			<xsl:value-of select="no" />
		</TD>
		<TD>
			<xsl:value-of select="author" />
		</TD>
		<TD>
			<xsl:value-of select="title" />
		</TD>
		<TD>
			<xsl:value-of select="publisher" />
		</TD>
		<TD>
			<!-- Damit das Preis-Datenfeld numerisch sortierbar ist, wird der Wert mit
			     amerikanischem Dezimaltrennzeichen (Punkt) gespeichert.
			     Fuer die deutsche Anzeige wird der Punkt hier durch das Komma ersetzt. --> 
			<xsl:value-of select="translate(price,'.',',')" /><xsl:text>&#160;Euro</xsl:text>
		</TD>
	</TR>
</xsl:template>

</xsl:stylesheet>

