[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] preceding sibling test
Hi, I'm trying to upgrade an old XSL file to the latest XSLT standard and have a small problem when testing against a previous sibling My XML file contains a number of ITEM's which contain amongst other things a <USER> and while processing each <ITEM> I need to check if the <USER> has changed. I used to use the following... <xsl:template match="ITEM"> <xsl:if test="not(USER = from-preceding(USER))"> <xsl:apply-templates select="USER"/> </xsl:if> ... etc With the new format I thought this should read <xsl:template match="PB_ITEM"> <xsl:if test="not(USER = preceding-sibling::USER[position()=1])"> <xsl:apply-templates select="USER"/> </xsl:if> ... etc but this always evaluates to true, so what am I doing wrong ? > regards > Richard 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
|