From: Benoit BARRE (benoit.barre@teluco.com)
Date: 13/04/2001 - 12:47
Bonjour Raphael,
Le modèle XML choisi n'est le simple pour permettre les manipulations
demandées. Il vaudrait mieux regrouper les données de chaque item.
Voici qqch qui doit marcher:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:template match="hit_machine">
<html>
<body>
<img
src="http://www.m6music.fr/actu/images/tops/top_hit/tt_top_hit.gif"
alt="">
</img>
<br>
</br>
<xsl:apply-templates />
</body>
</html>
</xsl:template>
<xsl:template match="image">
<img src="{.}">
</img>
<br>
</br>
</xsl:template>
<xsl:template match="titre">
<b>
<xsl:apply-templates />
</b>
<br>
</br>
<br>
</br>
</xsl:template>
<xsl:template match="texte">
<table width="400">
<font color="#232464" size="3">
<i>
<xsl:apply-templates />
</i>
</font>
<br>
</br>
</table>
</xsl:template>
<xsl:template match="classement">
<xsl:for-each select="classement_position">
<table>
<tr>
<td width="10%">
<img src="{following-sibling::classement_image[1]}" />
</td>
<td width="10%">
<font size="7" color="blue">
<b>
<xsl:value-of select="." />
</b>
</font>
</td>
<td width="70%">
<table width="100%" bgcolor="#1326565">
<tr>
<td>
<font color="white">
<b>
<xsl:value-of
select="following-sibling::classement_artiste[1]" />
</b>
</font>
</td>
</tr>
<tr>
<td>
<font color="white">
<xsl:value-of
select="following-sibling::classement_chanson[1]" />
</font>
</td>
</tr>
</table>
</td>
<td width="10%">
<xsl:if
test="following-sibling::classement_progression[1]='inchange'">
<img
src="http://www.m6music.fr/actu/images/tops/top_hit/lg_stanby.gif"
alt="" />
</xsl:if>
<xsl:if
test="following-sibling::classement_progression[1]='monte'">
<img
src="http://www.m6music.fr/actu/images/tops/top_hit/lg_up.gif" alt="" />
</xsl:if>
</td>
</tr>
</table>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
Cordialement,
Benoit
--
Devenez redacteur <XML>fr et contribuez au developpement du
xml francophone (http://xmlfr.org/infos/redacteurs/) !
Liste de diffusion "xml-tech@xmlfr.org" (http://xmlfr.org).
Cette liste est a votre disposition pour discuter en francais de
tout sujet technique lie a XML.
Pour resilier votre abonnement, envoyez un message contenant
la commande "unsubscribe" a xml-tech-request@xmlfr.org
(mailto:xml-tech-request@xmlfr.org?Subject=unsubscribe)
Archive générée par hypermail 2.1.3 le 28/06/2004 - 11:05 UTC
webmaster@xmlfr.org
|