Problems with variables.

Subject: Problems with variables.
From: "Sargeant, Richard (GEIS)" <Richard.Sargeant@xxxxxxxxxxx>
Date: Fri, 30 Jul 1999 09:55:24 +0200
I'm trying to suppress a field if the same value appears in the next item. 
For example, if the data looks like this

	<?xml version="1.0"?>

I need to create a report with...
   User AAA
   	Sender 7    Receiver 24
   	Sender 12   Receiver 17
   User BBB
   	Sender 7    Receiver 27
I therefore tried to make use of a variable but this does not work.

	<xsl:stylesheet xmlns:xsl="";>
	<xsl:variable name="varUser">xxx</xsl:variable>
	<xsl:template match="*|/">
	<xsl:template match="PB_ITEM">
		<xsl:apply-templates select="USER_ID"/>
		Sender <xsl:value-of select="SENDER"/>
		Receiver <xsl:value-of select="RECEIVER"/>
	<xsl:template match="USER_ID">
			<xsl:when test="$varUser='.'">
				<xsl:variable name='varUser' expr="."/>
				User <xsl:value-of select="."/>
	<xsl:template match="text()"><xsl:value-of

Can anyone see what I'm doing wrong ? Also, is there a better way of
acheiving this ?


 XSL-List info and archive:

Current Thread