<?xml version="1.0" encoding="UTF-8" ?>
<!--<? /*ceci est juste un faux tag PHP (<?) pour permettre la colorisation du code*/ -->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">

<html>
<body>
<table cellpadding="2" cellspacing="0" border="1">
	<tr>
		<th>ID</th>
		<th>Nom</th>
		<th>Classe</th>
		<th>Race</th>
		<th>Compétence</th>
		<th>Niveau</th>
	</tr>
	<xsl:for-each select="page/joueur">
		<tr>
			<!--// je fais ici mon test sur le N° du noeud -->
			<xsl:if test="position() mod 2 = 0">
				<!--// je définis mon attribut de style -->
				<xsl:attribute name="style">background-color:lightgrey;</xsl:attribute>
			</xsl:if>
			<td valign="top"><xsl:value-of select="@id"/></td>
			<td valign="top"><xsl:value-of select="@nom"/></td>
			<td valign="top"><xsl:value-of select="@classe"/></td>
			<td valign="top"><xsl:value-of select="@race"/></td>
			<td>
				<xsl:for-each select="competences/competence">
					<!--// Un petit tri pour organiser les données -->
					<xsl:sort select="@nom" data-type="text" order="ascending"/>
					<xsl:value-of select="@nom"/><br />
				</xsl:for-each>
			</td>
			<td>
				<xsl:for-each select="competences/competence">
					<!--// Même tri pour la cohérence -->
					<xsl:sort select="@nom" data-type="text" order="ascending"/>
					<xsl:value-of select="@niveau"/><br />
				</xsl:for-each>
			</td>
		</tr>
	</xsl:for-each>
</table>
</body>
</html>

</xsl:template>
</xsl:stylesheet>