Re: [xsl] Re: Xsl for each group issue in streaming mode

Subject: Re: [xsl] Re: Xsl for each group issue in streaming mode
From: "Martin Honnen martin.honnen@xxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 23 Aug 2016 16:37:22 -0000
On 23.08.2016 16:43, Mailing Lists Mail daktapaal@xxxxxxxxx wrote:
Posted this on saxon list yesterday. Not sure if my post was
successful.. so posting it here.. in case people in this list want to
test and check..

I have seen it and was able to reproduce it, I guess you will have to wait for a bug fix from Saxonica.



    <xsl:template match="Groups" mode="stream">
    <xsl:copy>
    <xsl:for-each-group select="Group/copy-of(.)"
    group-by="Group_Detail/GroupIdentifier">
    <xsl:variable name="GroupDetail" select="Group_Detail/copy-of(.)"/>
    <xsl:variable name="groupId" select="$GroupDetail/GroupIdentifier"/>
    <Formatted-Group groupId="{$groupId}">

Unrelated to the problem, but I think you don't need the variables at all but could simply use


<Formatted-Group groupId="{current-grouping-key()}">


    <xsl:copy-of select="current-group()/specifics"/>
    </Formatted-Group>
    </xsl:for-each-group>
    </xsl:copy>
    </xsl:template>

Current Thread