I'm trying to create XSLT to add 10 to each of the Quantity elements below
<Lines>
<JournalLine>
<ItemCode>40006061</ItemCode>
<Quantity>90</Quantity>
</JournalLine>
<JournalLine>
<ItemCode>40006031</ItemCode>
<Quantity>120</Quantity>
</JournalLine>
<JournalLine>
<ItemCode>40008331</ItemCode>
<Quantity>2400</Quantity>
</JournalLine>
</Lines>
Expected outcome:-
<Lines>
<JournalLine>
<ItemCode>40006061</ItemCode>
<Quantity>100</Quantity>
</JournalLine>
<JournalLine>
<ItemCode>40006031</ItemCode>
<Quantity>130</Quantity>
</JournalLine>
<JournalLine>
<ItemCode>40008331</ItemCode>
<Quantity>2410</Quantity>
</JournalLine>
</Lines>
Everything I have tried so far has resulted in the same value being repeated in all the nodes, any help appreciated.
EDIT:
I'm using XSLT-2.0, and this is my XSLT code so far:
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="w3.org/1999/XSL/Transform">
<xsl:output method="xml" version="1.0" encoding="utf-8" omit-xml-declaration="no" indent="yes" />
<xsl:template match="node()|@*">
<xsl:copy>
<xsl:apply-templates select="node()|@*"/>
</xsl:copy>
</xsl:template>
<xsl:template match="Quantity/text()">
<xsl:value-of select = "format-number(//Quantity, '###,###.00')"/>
</xsl:template>
<xsl:template match="Filename"></xsl:template>
</xsl:stylesheet>