![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Check against Previous Field value in a for-each >Thread Next - Re: Check against Previous Field value in a for-each Re: Check against Previous Field value in a for-eachTo: NULL Date: 9/2/2007 9:45:00 PM Search for "grouping methods in XSLT" or for "Muenchian grouping" Cheers, Dimitre Novatchev "kermit" <kermit@d...> wrote in message news:620935FC-3A06-4980-92B4-E6E5B5D973D9@m...... >I have a XML structure like: > - - - - > <EVENTS> > <EVENT> > <EYEAR>2007</EYEAR> > <ENAME>EVENT One</ENAME> > </EVENT> > <EVENT> > <EYEAR>2008</EYEAR> > <ENAME>EVENT Two</ENAME> > </EVENT> > > </EVENTS> > - - - - > Then I have a XSL Template with a for each loop. Before the for each > loop > I define > a parameter > > <xsl:param name="EventYearLast">1999</xsl:param> > > > <xsl:for-each select="./EVENTS/EVENT"> > > I want to do some conditional formatting here based on if the > <EYEAR> > value > is different from the previoius <EYEAR> value. > something like: > > <xsl:if test="EVENTYEAR != $EventYearLast"> > <tr> > <td valign="top" colspan="2"> > <p align="center"><b<u> > <xsl:value-of select="EVENTYEAR"/> > EVENTS</u></b><br/> > </p> > </td> > </tr> > </xsl:if> > > <xsl:param name="EventYearLast"><xsl:value-of > select="EVENTYEAR"/></xsl:param> > > </xsl:for-each> > > The above does not work because it will not allow the <xsl:param inside > the > xsl:for-each loop > > HOW DO IT DO THIS??? I've tried several things to no avail. There has > got > to be a way. ???? > > Thank you ahead of time!! | ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||
|
