[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Comparing an XML value from current record and previou
Hi, I am new to XSL and have some code that I need edited. We are currently looping through an XML recordset. We need an if statement that checks the current and previous record's value of the XML tag "HORSE_FRONT_ROW_FLAG". If the current record's value of HORSE_FRONT_ROW_FLAG tag is "2", and the previous record's value of HORSE_FRONT_ROW_FLAG is "1", then the system needs to print some text.... This is the current code: <xsl:for-each select="RACE_LIST_HORSES/HORSE"> <section startonnewpage="false" pagesize="a5" leftmargin="1cm" rightmargin="1cm" topmargin="1cm" bottommargin="1cm"> <paragraph type="textparagraph" alignment="center"> <fragment font="Helvetica" fontsize="10"> ------------------------------------------------ Second Row ------------------------------------------------</fragment> </paragraph> </section> The current code is below. xsl:for-each select="RACE_LIST_HORSES/HORSE"> <section startonnewpage="false" pagesize="a5" leftmargin="1cm" rightmargin="1cm" topmargin="1cm" bottommargin="1cm"> </section> </xsl:for-each> Here is the pseudocode for what I need implemented... <xsl:for-each select="RACE_LIST_HORSES/HORSE"> <section startonnewpage="false" pagesize="a5" leftmargin="1cm" rightmargin="1cm" topmargin="1cm" bottommargin="1cm"> <if current Record's value for RACE_LIST_HORSES/HORSE/HORSE_FRONT_ROW_FLAG = 2> <if previous record's if current Record's value for RACE_LIST_HORSES/HORSE/HORSE_FRONT_ROW_FLAG = 1> <section startonnewpage="false" pagesize="a5" leftmargin="1cm" rightmargin="1cm" topmargin="1cm" bottommargin="1cm"> <paragraph type="textparagraph" alignment="center"> <fragment font="Helvetica" fontsize="10"> ------------------------------------------------ Second Row ------------------------------------------------</fragment> </paragraph> </section> <end if> <end if> </section> </xsl:for-each>
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|