Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Conditional for-each. Please help me. I've read all the internet groups [Thread Next] Re: Conditional for-each. Please help me. I've read all the internet groupsTo: NULL Date: 3/13/2007 11:30:00 PM srecce@g... wrote: > Somebody knows how to do that ? Did you try reading the documentation on XSLT at http://www.w3.org/TR/xslt ? > <xsl:variable name="test1" select="//row" /> > <xsl:variable name="test2" select="//row[substring(@CreateDate,1,4)= > $byYear]" /> > > IF I = 1 then > <xsl:for-each select="$test1"> > ELSE > <xsl:for-each select="$test2"> <xsl:choose> <xsl:when test="$I=1"> <xsl:for-each select="$test1"> some stuff </xsl:for-each> </xsl:when> <xsl:otherwise> <xsl:for-each select="$test1"> other stuff </xsl:for-each> </xsl:otherwise> </xsl:choose> ///Peter -- XML FAQ: http://xml.silmaril.ie/ | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
