🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: fr.comp.text.xml
Article #8767

Re: XSL : insrtion conditionnelle de balise HTML

#8767
From: Joseph Vallot
Date: Wed, 25 Jul 2001 08:42
50 lines
2402 bytes
Thomas Broyer wrote:


> In <9jkin3$5k2$1@fenris.isp.9tel.net>, Christian Delaunay wrote:
> > dans un fichier xsl, je voudrais rendre conditionnelle l'insertion d'une
> > balise HTML, ce qui donnerait ( dans mon cas ) qqchose comme :
> > 
> > ...
> > <xsl:if test="...">
> >     <TR>
> >     <TBODY>
> > </xsl:if>
> > ...
> > 
> > Le probl�me est que le parseur ( MSXML 3 depuis IE 5 )
> > ne d�tectant pas les balises </TBODY> et </TR> g�n�re une erreur.
> > 
> > Y a t il une astuce pour r�soudre ce genre de probl�me ?


> Il y a un article sur IBM developerWorks
> http://www-106.ibm.com/developerworks/library/x-divel.html?n-x-7121


> Sinon, l'"astuce" la plus simple est d'aller au plus logique :
>   <xsl:choose>
>   <xsl:when test="...">
>     <tbody>
>     <tr>
>       <!-- ici le traitement "normal" -->
>     </tr>
>     </tbody>
>   </xsl:when>
>   <xsl:otherwise>
>     <!-- ici le traitement "normal" -->
>   </xsl:otherwise>
>   </xsl:choose>


j'ai eu un probl�me similaire : j'avais un template qui remplissait des cellules de table (<td>), mais je voulais que toutes les trois cellules, il y ait changement de ligne, c'est � dire l'insertion d'un </tr><tr>. 
C'�tait pas vraiment appr�ci�...
j'ai r�solu �a sauvagement en ins�rant 
<xsl:text disable-output-escaping="yes">&lt;/tr>&lt;tr></xsl:text>


pas tr�s beau, mais j'ai pas trouv� mieux...


-- 
Joseph
Technical Details
Message-ID: <JDv77.198$qt5.270387@nnrp1.proxad.net>
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news.tele.dk!193.251.151.101!opentransit.net!proxad.net!feeder2-1.proxad.net!nnrp1.proxad.net.POSTED!not-for-mail
References: <15563145.eYUQgxmLvF@ltgt.net>

Show Full Headers
Complete Article Headers
X-Google-Language: FRENCH,ASCII
X-Google-Thread: 114f60,c86f9bd60a4a1cf7
X-Google-Attributes: gid114f60,public
X-Google-ArrivalTime: 2001-07-25 01:42:18 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news.tele.dk!193.251.151.101!opentransit.net!proxad.net!feeder2-1.proxad.net!nnrp1.proxad.net.POSTED!not-for-mail
From:  vallot@yahoo.com (Joseph Vallot)
Reply-To:  vallot@yahoo.com (Joseph Vallot)
Newsgroups:  fr.comp.text.xml
Subject:  Re: XSL : insrtion conditionnelle de balise HTML
References:  <15563145.eYUQgxmLvF@ltgt.net>
X-ip: 62.161.61.19 (62.161.61.19) - 
Organization:  Organisation
Lines: 56
Message-ID: <JDv77.198$qt5.270387@nnrp1.proxad.net>
Date: Wed, 25 Jul 2001 08:42:17 GMT
NNTP-Posting-Host: 212.27.35.108
X-Complaints-To: abuse@proxad.net
X-Trace: nnrp1.proxad.net 996050537 212.27.35.108 (Wed, 25 Jul 2001 10:42:17 CEST)
NNTP-Posting-Date: Wed, 25 Jul 2001 10:42:17 CEST