[XSL] Probléme de compraraison de données
Bonjour à tous,
j'ai un soucis que je comprend pas trop, je fais un test :
Code:
1 2
|
<xsl:when test="document('mantis594.xml')/Workbook/Worksheet/Table/Row[contains(normalize-space(@fileRef),normalize-space(Cell/Data))]/Cell/Data"> |
Mais le probléme c'est dans le contains la variable @fileRef (par ex contient "Varplop" ne semble pas fonctionner.
Je m'explique, lorsque je remplace cette variable par la valeur du fichier ("Varplop"), le test est à true, mais quand je met la variable il est à false (j'affiche cette valeur plus bas donc je suis sur que c'est la bonne valeur ("Varplop")).
voici le code entier pour plus de clarté.
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
|
<xsl:template match="/">
<xsl:comment> $RCSfile: top_i_affichage_business_view.xsl,v $ </xsl:comment>
<html>
<xsl:call-template name="GnxHead"/>
<body style="liste">
<!-- LISTE DES BUSINESS VIEWS PAR ESNEMBLE GLOBAL -->
<h1>
<xsl:value-of select="$LBL.ELTS03"/>
</h1>
<table border="0" cellpadding="0" cellspacing="0" class="liste" width="90%" align="center">
<xsl:apply-templates select="document('configuration.xml')/egx:config/egx:application/egx:presentation/egx:xsl" mode="VS">
<xsl:sort select="@name"/>
</xsl:apply-templates>
</table>
</body>
</html>
</xsl:template>
<!-- LISTE DES BUSINESS VIEWS UTILISANT LA VIEWSTRUCT (lien vers détail de la structure) -->
<xsl:template match="egx:xsl" mode="VS">
<tr>
<xsl:choose>
<xsl:when test="document('mantis594.xml')/Workbook/Worksheet/Table/Row[contains(normalize-space(@fileRef),normalize-space(Cell/Data))]/Cell/Data">
<xsl:attribute name="style">background-color:red;</xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="class">l{position() mod 2}</xsl:attribute>
</xsl:otherwise>
</xsl:choose>
<td>
<xsl:value-of select="../../egx:businessview_def/egx:businessview[@name=current()/@businessview]/@name"/>
</td>
<td>
<xsl:value-of select="@fileRef"/>
</td>
<td>
<xsl:value-of select="@lang"/>
</td>
<td>
<xsl:value-of select="@support"/>
</td>
</tr>
</xsl:template>
</xsl:stylesheet> |
Merci d'avance
Bye