Article View: fr.comp.text.xml
Article #8582Je bloque :(
From: Marc Chouteau
Date: Sat, 15 Sep 2001 08:02
Date: Sat, 15 Sep 2001 08:02
44 lines
2315 bytes
2315 bytes
J'ai un arbre comme ceci :
<root>
<item/>
<item/>
<item/>
<item/>
</root>
a l'aide d'un xsl je veux une representation html du type
+----------------------+--------------------------+
| item1 | item2 |
+----------------------+--------------------------+
| item3 | item4 |
+----------------------+--------------------------+
pour l'instant la meilleure solution que j'ai trouv� est celle-ci :
<xsl:for-each select="item">
<xsl:choose>
<xsl:when test="position() mod 2!=0">
<xsl:element name="tr"/>
<xsl:apply-templates select="."/>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="."/>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
<xsl:template match="item">
<td><xsl:value-of select="."/></td>
</xsl:template>
�a fonctionne tr�s bien avec ie car dans sa grande bont�, il comprend qu'un
debut de tr apr�s un fin de td implique la fermeture du tr pr�cedent, mais
c'est de la bidouille qui ne fonctionne pas avec les autres navigateurs.
si quelqu'un a une id�e...
--
Marc Chouteau
http://chouteau.tv
Technical Details
Message-ID:
<9nv1tv$osa$1@wanadoo.fr>Path:
arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!193.251.151.101!opentransit.net!wanadoo.fr!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: FRENCH,ASCII X-Google-Thread: 114f60,601452a42ddfa0a6,start X-Google-Attributes: gid114f60,public X-Google-ArrivalTime: 2001-09-15 01:02:08 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!193.251.151.101!opentransit.net!wanadoo.fr!not-for-mail From: "Marc Chouteau" <--@--.--> Newsgroups: fr.comp.text.xml Subject: Je bloque :( Date: Sat, 15 Sep 2001 10:02:06 +0200 Organization: Wanadoo, l'internet avec France Telecom Lines: 45 Message-ID: <9nv1tv$osa$1@wanadoo.fr> NNTP-Posting-Host: ca-ol-bordeaux-21-59.abo.wanadoo.fr Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-Trace: wanadoo.fr 1000540927 25482 217.109.144.59 (15 Sep 2001 08:02:07 GMT) X-Complaints-To: abuse@wanadoo.fr NNTP-Posting-Date: 15 Sep 2001 08:02:07 GMT X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000