|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: XSLT2 grouping over multiple documents
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()[@correct='correct'])"/> this is, I was looking for. Thank You! Thomas
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








