Bonjour à tous,
Voici mon xml :
<paragraph type="picto">
<title>Nombre de doubles</title>
<body>
<line type="item">318</line>
</body>
</paragraph>
<paragraph type="picto">
<title>Nombre de triples</title>
<body>
<line type="item">0</line>
</body>
</paragraph>
<paragraph type="picto">
<title>Nombre de quadruples</title>
<body>
<line type="item">0</line>
</body>
</paragraph>
etc etc.... il y a un nbre de paragraph assez conséquent.
je desire afficher une tableau html comme suit :
<xsl:template name="SERVICES">
<xsl:for-each select="document/paragraph[@type='picto']">
<xsl:variable name="i"><xsl:value-of select="position()"/></xsl:variable>
<tr class="fondgris">
<td width="124" class="tx"><xsl:value-of select="title[$i]"/></td>
<td width="58" class="txbptbleucentre"><xsl:value-of select="body/line[$i]"/></td>
<td width="127" class="tx"><xsl:value-of select="title[position()=$i+1]"/></td>
<td width="63" class="txbptbleucentre"><xsl:value-of select="body/line[$i+1]"/></td>
<td width="145" class="tx"><xsl:value-of select="title[position()=$i+2]"/></td>
<td width="73" class="txbptbleucentre"><xsl:value-of select="body/line[$i+2]"/></td>
</tr>
</xsl:for-each>
</xsl:template>
il s'agit d'une table avec 3 colonnes et a chaque fois j'affiche dans une colonne un paragraph contenu dans mon xml avant de recréer une nouvelle ligne.
j'ai essayé differentes solutions je vous ai mis a disposition ci dessus ma derniere tentative en date.
Mci d'avance à tous ceux ki ont une id
Yannick
--
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)
Received on Tue Apr 29 10:51:18 2003