Habe es nun so probiert:
<xsl:template match="ItemDeliveryInformation">
<xsl:for-each select="current()[generate-id() = generate-id(key('group', concat(LineNumDeliveryNote, PackingSlipId, DeliveryDate))[1])]">
<ItemDeliveryInformation>
<xsl:copy-of select="LineNumDeliveryNote"/>
<xsl:copy-of select="PackingSlipId"/>
<xsl:copy-of select="DeliveryDate"/>
<DeliveredQuantity>
<xsl:value-of select="format-number(sum(key('group', concat(LineNumDeliveryNote, PackingSlipId, DeliveryDate))/DeliveredQuantity), '#.00')"/>
</DeliveredQuantity>
</ItemDeliveryInformation>
</xsl:for-each>
</xsl:template>
Nun kommt folg. Error:
Recoverable error Ambiguous rule match for /SALESINVOICE[1] Matches both "@* | node()" on line -1 of and "node()|@*" on line -1 of Recoverable error