Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Check against Previous Field value in a for-each

From: "Dimitre Novatchev" <dimitren@---.---.-->
To: 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!! 




transparent
Print
Mail
Digg
delicious
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent