Subject: Re: "not a node item" inside distinct-values
From: "andrew welch" <andrew.j.welch@xxxxxxxxx>
Date: Thu, 8 Jun 2006 17:05:40 +0100
|
On 6/8/06, David Carlisle <davidc@xxxxxxxxx> wrote:
Others have pointed to teh immediate cause of teh error message, but if
you find yourself doing this:
> <xsl:for-each select="distinct-values(//item/@racknum)">
> <xsl:variable name="rack-num" select="."/>
> <xsl:variable name="pocket-num" select="//item[./@racknum =
> $rack-num and position() = last()]"/>
9 times out of 10 its easier (and probably more efficient) to do
<xsl:for-each-group select="//item" group-by="@racknum">
Very good point.
This made me think - other than terseness, why would you choose
distinct-values() over for-each-group?
Nothing stands out....
|