problème avec la fonction contains()
Bonjour,
Structure de mon xml:
bibliotheque
->collection
-->album
---->titre
---->serie
---->numero
---->auteur
------>prenom
------>nom
---->editeur
-->album
->collection
bibliotheque
Un de mes auteurs a pour prénom "John" et je voudrais n'afficher que celui-là en fesant ceci via un xsl:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13
| (...)
<h3>Contains or not?: Prénom "John" (avec choose/when)</h3>
<xsl:for-each select="bibliotheque/collection/album">
<ul>
<xsl:choose>
<xsl:when test="auteur/prenom[contains(.,'John')]">
<li style="color:red;"><xsl:value-of select="./titre"></xsl:value-of></li>
</xsl:when>
<xsl:otherwise></xsl:otherwise>
</xsl:choose>
</ul>
</xsl:for-each>
(...) |
Je fais sans doute quelque chose de très faux...
Merci,
V.