This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
preceding sibling test
- To: "xsl-list at mulberrytech dot com (E-mail)" <xsl-list at mulberrytech dot com>
- Subject: preceding sibling test
- From: "Sargeant, Richard (GEIS)" <Richard dot Sargeant at geis dot ge dot com>
- Date: Fri, 11 Feb 2000 16:45:26 +0100
- Reply-To: xsl-list at mulberrytech dot com
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