[Home] [By Thread] [By Date] [Recent Entries]
Dear Kumar,
If your input looks like <?xml version="1.0" encoding="utf-8"?> <doc> <mezo eazon="AA">200</mezo> <mezo eazon="AA">50</mezo> <mezo eazon="AA">300</mezo> <mezo eazon="AA">50</mezo> </doc> you may transform it using the following XSLT (2.0): <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0" > <xsl:output
method="xml"
indent="yes"
/> <xsl:template match="/">
<xsl:apply-templates />
</xsl:template> <xsl:template match="doc">
<xsl:copy>
<xsl:for-each-group select="*"
group-starting-with="*[position() mod 2 = 1]">
<xsl:copy-of select="current-group()" />
<mezo eazon="BB">
<xsl:value-of select="sum(current-group())"/>
</mezo>
</xsl:for-each-group>
</xsl:copy>
</xsl:template></xsl:stylesheet> Gerrit On 22.02.2010 09:09, anil kumar wrote: Hi,
Registergericht / Commercial Register: Amtsgericht Leipzig Registernummer / Registration Number: HRB 24930 Geschdftsf|hrer: Gerrit Imsieke, Svea Jelonek, Thomas Schmidt, Dr. Reinhard Vvckler
|

Cart



