xsl-list
[Top] [All Lists]

[xsl] Sorting in order to count unique Records.

2006-09-05 13:30:20
I'm setting up a recursive template in order to count the amount of
unique records at the end for tabulation.

I'm wondering if I can use xsl:sort to get the names in order, then
have the template check to see if the following-sibling matches.

Thing about recursive templates is you only pass the first record.
Would xsl:sort only sort the first record (doing nothing)?

<xsl:for-each select="Record[1]">
        <xsl:sort select="name" />
        <xsl:apply-templates select="." />
</xsl:for-each>

Is there a problem? If so, would the following extra step solve it?

<xsl:for-each select="Records">
        <xsl:sort select="Record/name" />    <!--- ???
             <xsl:for-each select="Record[1]">
             <xsl:apply-templates select="." />
   </xsl:for-each>
</xsl:for-each>

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>