XSL comparaison ligne tableau
Bonjour ,
je suis en train de developper un .XSL ( Xml style) cependant j'éprouve quelque difficulté pour réaliser ce qui suit
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86
| <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" encoding="ISO-8859-1" doctype-public="-//W3C//DTD HTML 4.01//EN" doctype-system="http://www.w3.org/TR/html4/strict.dtd" indent="yes" />
<xsl:template match="/">
<html>
<header>
<title> XML_Rapport </title>
</header>
<body bgcolor="#FFFFCC">
<table style=" width:70% ; align:center">
<tr>
<img style="float:left" src="http://94.23.30.57/portailDS/Imgs/logoDsBas.png" />
<th style="border:3" ><H1><u>Rapport de Copie</u></H1></th>
</tr>
</table>
<br />
<hr />
<p> <b>Rapport de Copie du :</b> <xsl:value-of select="RapportCopie/DCP_Copie/Date"/></p>
<p> <b>Nom du DCP : </b><xsl:value-of select="RapportCopie/DCP_original/Nom_DCP"/></p>
<hr />
<br />
<table border="2" cellspacing="0" cellpadding="3" bgcolor="#C0C0C0" style="float:left ; width:70% ">
<tr bgcolor="FF9900">
<th>Nom du Fichier Original</th>
<th>Hash Original</th>
</tr>
<xsl:for-each select="RapportCopie/DCP_original/Hash">
<tr>
<td><xsl:value-of select="@name"/></td>
<td><xsl:value-of select="@hash"/></td>
</tr>
</xsl:for-each>
<tr bgcolor="FF9900">
<th>Nom du Fichier Originale</th>
<th>Taille Fichier Originale </th>
</tr>
<xsl:for-each select="RapportCopie/DCP_original/Taille_fichier_octet">
<tr>
<td><xsl:value-of select="@name"/></td>
<td><xsl:value-of select="@size"/></td>
</tr>
</xsl:for-each>
</table>
<table border="2" cellspacing="0" cellpadding="3" style=" width:30% " bgcolor="#CCCCFF" >
<tr bgcolor="#FFFF00">
<th>Hash Fichier Copier </th>
</tr>
<xsl:for-each select="RapportCopie/DCP_Copie/Hash">
<tr>
<td><xsl:value-of select="@hash"/></td>
</tr>
</xsl:for-each>
<tr bgcolor="#FFFF00" >
<th>Taille Fichier Copier </th>
</tr>
<xsl:for-each select="RapportCopie/DCP_Copie/Taille_fichier_octet">
<tr>
<td><xsl:value-of select="@size"/></td>
</tr>
</xsl:for-each>
</table>
<br />
<hr />
<p align="center"><FONT size="1pt"> Généré par DCP_TOOLS </FONT></p>
<p align="center"><FONT size="1pt"> <a href="http://www.distri-service.com">Site de Distribution service</a></FONT></p>
</body>
</html>
</xsl:template>
</xsl:stylesheet> |
Voila ce code XSL me donne une page avec 2 tableau affichant les valeurs d'un fichier XML cependant je voudrais rajouter une colonne supplémentaire afin de dire si la colonne 2 et 3 sont identique alors OK
Plus clairement je posséde un tableau de 3 colonne ( nom du fichier , hash fichier , hash fichier après copie ) je voudrais une quatrième colonne afin de dire si hash fichier == hash fichier copie je pense que c'est simple mais je ne sais pas du tout si c'est possible a faire et si oui comment ne maîtrisant que très peu ce XSL je galère un peu
Si quelqu'un a une idée je suis preneur
Bien cordialement