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

RE: Removing duplicates

Subject: RE: Removing duplicates
From: "James Carlyle" <james.carlyle@xxxxxxxxxxxx>
Date: Thu, 17 Oct 2002 20:24:45 +0100
RE:  Removing duplicates
Clay

> I need to make certain that I don't print the same value twice on
> a detail
> line. I have up to 6 values, and I've been trying to brute force it, by
> making certain it's not equal to a previous item (see below). I
> display the
> RC, unless a corresponding TRC exists.

I understand that you want to process RC elements unless there is a
preceding RC with the same value.  Is this correct?

If so, try this:

<xsl:template match="/RCDATA">
...
<xsl:for-each select="RCDATALINE">
	<xsl:apply-templates select="RC"/>
</xsl:for-each>
...
</xsl:template>

<xsl:template match="RC">
	<xsl:if test="not(preceding::RC[text()=current()/text()])">
		...
	</xsl:if>
</xsl:template>

Kind regards,

James Carlyle

FableFlow : MMS templating and delivery
Multimedia Messaging commentary : http://www.fableflow.com/weblog/


 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-2011 All Rights Reserved.