[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: compare two values
Hello Jan ! > i want to compare the value of <Art_nr> in one row with this, which is in > the row before. if they are similar, i want to show something, if not > nothing should happen. > how can i coompare these values. i tried to do it by count(row) and the > position() function but it does not work. You can get access to previous row in the current nodeset by "preceding-sibling::row[1]" expression and compare rows' values by simple '=' operator. <xsl:apply-templates select="row"> ... <xsl:template match="row"> <xsl:if test="preceding-sibling::row[1]/Art_nr = Art_nr"> do something </xsl:if> Row processing </xsl:template> --- Oleg Tkachenko Multiconn International XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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
|