[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

preceding sibling test

Subject: preceding sibling test
From: "Sargeant, Richard (GEIS)" <Richard.Sargeant@xxxxxxxxxxx>
Date: Fri, 11 Feb 2000 16:45:26 +0100
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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.