Hello Michael,
Michael Kay schrieb:
You don't actually need to make copies of all the documents before grouping
them. Just do
<xsl:for-each-group select="document(a/@href)/responses/response"
group-by="@for">
Something like this was my first try, but did not work (therefor the
copy). Seems I have made a mistake.
The inner loop:
<xsl:for-each-group select="current-group()"
group-by="@correct">
<xsl:value-of select="count(current-group())" />
</xsl:for-each-group>
is interesting because a selected element doesn't get put in a group if the
grouping key evaluates to an empty sequence. So it seems there will only be
one group coming out of this, the group that has @correct='correct'.
Yes, in this case is this wanted, but ...
So this
loop seems unnecessary, it is equivalent to
<xsl:value-of select="count(current-group()[(_at_)correct='correct'])"/>
this is, I was looking for.
Thank You!
Thomas
--~------------------------------------------------------------------
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>
--~--