xsl-list
[Top] [All Lists]

Re: [xsl] "not a node item" inside distinct-values

2006-06-08 09:06:02
On 6/8/06, David Carlisle <davidc(_at_)nag(_dot_)co(_dot_)uk> 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....

--~------------------------------------------------------------------
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>
--~--