RE: [xsl] Removing duplicates

Subject: RE: [xsl] Removing duplicates
From: Clay Leeds <cleeds@xxxxxxxxxx>
Date: Wed, 23 Oct 2002 10:00:49 -0700
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