This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
designing a xsl:uniq function
- To: xsl-list at lists dot mulberrytech dot com
- Subject: [xsl] designing a xsl:uniq function
- From: Paul Terray <terray at 4dconcept dot fr>
- Date: Tue, 04 Sep 2001 13:17:49 +0100
- References: <1787788989.20010904113459@jenitennison.com>
- Reply-To: xsl-list at lists dot mulberrytech dot com
Hello,
I recently went through some code I wrote for a 3 levels index, and I was
very unproud of the result. My main problem is that I need to have a uniq
value for my elements. Is there a way to cleanly design a template that
would isolate an element, just like the xsl:sort works (a XSL equivalent to
the UNIX uniq utility) ?
Perhaps a new command for XSLT 2.0 ? It would look like :
<xsl:for-each select="//indexentry[@level1=$my_first_level and @level2]">
<xsl:sort select="@level2"/>
<xsl:uniq select="@level2"/>
[...]
</xsl:for-each>
What do you think of it ?
--
Paul TERRAY - Documents Management Systems Engineer
4Dconcept
Centre d'affaires - 22, rue Etienne de Jouy
78353 Jouy en Josas CEDEX
FRANCE
Tel. +33 (0)1 34 58 70 70 - Fax. +33 (0)1 39 46 06 90
email : terray@4dconcept.fr
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list