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

RE: Removing duplicates

Subject: RE: Removing duplicates
From: Clay Leeds <cleeds@xxxxxxxxxx>
Date: Wed, 23 Oct 2002 10:00:49 -0700
xsl if duplicates
James,

I got it! As appears is usually the case, it was easier than I thought it would be (D'oh!)! Thanks a bejillion for all your help & time! I'll be watching the list to see if I can help anyone else!

Woohoo! Here's the XPath:

not(TRC[.=parent::*/preceding-sibling::*/TRC])

Here's the final XSL:
<xsl:for-each select="RCDATA/RCDATALINE">
<fo:inline>
<xsl:attribute name="color">
<xsl:choose>
<xsl:when test="position() mod 2 =0">#333333</xsl:when>
<xsl:otherwise>#000000</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:choose>
<xsl:when test="RC[.!=''] and TRC[.!='']">
<xsl:if test="not(TRC[.=parent::*/preceding-sibling::*/TRC])">
<xsl:apply-templates select="TRC"/>
</xsl:if>
</xsl:when>
<xsl:otherwise>
<xsl:if test="RC[.!='']">
<xsl:apply-templates select="RC"/>
</xsl:if>
</xsl:otherwise>
</xsl:choose>
<fo:inline>
<xsl:if test="RC[.!=''] and not(TRC[.=parent::*/preceding-sibling::*/TRC])">
<xsl:if test="(position() mod 4) != 0 and not(position() = last())">
<fo:inline font-size="4pt">&#160;</fo:inline>
</xsl:if>
</xsl:if>
</fo:inline>
</fo:inline>
</xsl:for-each>


I doubt I could've done it without your help! I really appreciate it!


- Clay Leeds - Web Developer/Programmer - cleeds@xxxxxxxxxx


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.