Article View: fr.comp.text.xml
Article #8755Re: XSL: Comment savoir si un element fils est present dans un noeud?
From: Eric TOURNIER
Date: Mon, 23 Jul 2001 07:49
Date: Mon, 23 Jul 2001 07:49
27 lines
1698 bytes
1698 bytes
Guillaume BERTHOMMIER a οΏ½crit : > > <element-pere> > <element-fils1>...</element-fils1> > <element-fils2>...</element-fils2> > </element-pere> > > le fait est que le fils1 et le fils2 peuvent etre present ou non, > comment puis-je tester si l'element fils en question est present? avec > xsl:if et xsl:choose ca ne marche pas. > Faire : <xsl:template match="element-pere"> <xsl:if test="element-fils1 != '' "> ... </xsl:if> <xsl:if test="element-fils2 != '' "> ... </xsl:if> </xsl:template> marche (Apache, Tomcat, Cocoon) mm si ce n'est pas forcement la solution la plus elegante :) Eric
Technical Details
Message-ID:
<3B5BD704.F721E6B8@alcion.fr>Path:
arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!grolier!nerim.net!isdnet!inetway!inetway.net!not-for-mailReferences:
<3B4C6ABE.3AB50E16@igbmc.u-strasbg.fr>Show Full Headers
Complete Article Headers
X-Google-Language: FRENCH,ASCII X-Google-Thread: 114f60,990990f769035177 X-Google-Attributes: gid114f60,public X-Google-ArrivalTime: 2001-07-23 00:56:01 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!grolier!nerim.net!isdnet!inetway!inetway.net!not-for-mail From: Eric TOURNIER <etournier@alcion.fr> Newsgroups: fr.comp.text.xml Subject: Re: XSL: Comment savoir si un element fils est present dans un noeud? Date: Mon, 23 Jul 2001 09:49:24 +0200 Organization: UUNET Lines: 27 Message-ID: <3B5BD704.F721E6B8@alcion.fr> References: <3B4C6ABE.3AB50E16@igbmc.u-strasbg.fr> NNTP-Posting-Host: 212.155.126.80 Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: reader1.fr.uu.net 995876183 3756 212.155.126.80 (23 Jul 2001 08:16:23 GMT) X-Complaints-To: abuse@fr.uu.net NNTP-Posting-Date: 23 Jul 2001 08:16:23 GMT X-Mailer: Mozilla 4.75 [fr] (Windows NT 5.0; U) X-Accept-Language: fr