I have a XSL-File which has been written for being used with a XSLT 2.0 Transformer, but now I need to change the file in order to make it work with XSLT 1.0. I know the for-each-group
-command is a XSLT 2.0 feature, but what about all the other things? How would I change my file to make it work with 1.0?
Here's the XSL-File:
<xsl:template match="ROWSET">
<ROWSET>
<xsl:for-each-group select="ROW" group-by="UKID">
<UEBERKUNDE>
<NAME><xsl:value-of select="UEBERKUNDE" /></NAME>
<xsl:copy-of select="UKID" />
<xsl:for-each-group select="current-group()" group-by="KUNDENNR">
<KUNDE>
<xsl:copy-of select="KUNDENNR" />
<xsl:copy-of select="KNAME1" />
<xsl:copy-of select="KNAME2" />
<xsl:copy-of select="KNAME3" />
<xsl:copy-of select="LAND" />
<xsl:copy-of select="PLZ" />
<xsl:copy-of select="ORT" />
<xsl:copy-of select="ADM" />
<xsl:copy-of select="KUNDENKLASSE" />
<xsl:copy-of select="MITARBEITER" />
<xsl:copy-of select="BELEGART" />
<EFAKTURA><xsl:value-of select="normalize-space(EFAKTURA)" /></EFAKTURA>
<WEBSTATUS><xsl:value-of select="normalize-space(WEBSTATUS)" /></WEBSTATUS>
<ZAHLUNGSBEDINGUNG><xsl:value-of select="normalize-space(ZAHLUNGSBEDINUNG)" /></ZAHLUNGSBEDINGUNG>
<xsl:for-each select="current-group()[count(. | key('rowsByMonth', concat(MONAT,'+',JAHR,'+',KUNDENNR))[1]) = 1]">
<ROW>
<xsl:copy-of select="JAHR" />
<xsl:copy-of select="MONAT" />
<xsl:copy-of select="HANDLING" />
<xsl:copy-of select="SOLLFRACHT" />
<xsl:for-each select="key('rowsByMonth', concat(MONAT,'+',JAHR,'+',KUNDENNR))">
<WARENGRUPPE>
<xsl:copy-of select="HGNAME" />
<xsl:copy-of select="HGID" />
<xsl:copy-of select="DG_BASIS" />
<xsl:copy-of select="EKECHT" />
<xsl:copy-of select="DB_BASIS" />
<xsl:copy-of select="NETTO" />
</WARENGRUPPE>
</xsl:for-each>
</ROW>
</xsl:for-each>
</KUNDE>
</xsl:for-each-group>
</UEBERKUNDE>
</xsl:for-each-group>
</ROWSET>
</xsl:template></xsl:stylesheet>
Thanks in advance!
for-each-group
and its counterpartcurrent-group()
. – JLRishefor-each-group
to keep it working? – gasparuff