![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Re: Check against Previous Field value in a for-each [Thread Next] Re: Check against Previous Field value in a for-eachTo: NULL Date: 9/4/2007 3:24:00 PM OK, I can see where Muenchain Grouping would probably do what I need....however I have spend over 48 hours trying use it to do what I need and all I have is a flat head and an inferiority complex. Is there not a more striait forward way to accomplish this? Maybe using <xsl:script lang=javascript I will also want to idntify every other record for formatting. Unless I can find a method other than Meuchain Grouping I may spend the rest of my short life trying to get this to work. "Dimitre Novatchev" wrote: > 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 | |||
|
