This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: avoiding repeated items
- To: <xsl-list at lists dot mulberrytech dot com>
- Subject: RE: [xsl] avoiding repeated items
- From: "Evan Lenz" <elenz at xyzfind dot com>
- Date: Thu, 1 Mar 2001 15:01:59 -0800
- Reply-To: xsl-list at lists dot mulberrytech dot com
Tim Watts wrote:
> <xsl:for-each select="poetas/autor">
> <xsl:choose>
> <xsl:when test="not(.=preceding::autor)">
> <xsl:value-of select="."/>
> </xsl:when>
> </xsl:choose>
> </xsl:for-each>
Yep, or more succinctly, and with line breaks:
<xsl:for-each select="/poetas/autor[not(.=preceding::autor)]">
<xsl:value-of select="."/>
<xsl:text>
</xsl:text>
</xsl:for-each>
Evan
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list