how to sum values with commas using sum()
问题 I have the following XML document: <nodes> <node> <type>A</type> <val>1,000</val> </node> <node> <type>B</type> <val>2,000</val> </node> <node> <type>A</type> <val>3,000</val> </node> </nodes> My goal is to get a list of unique types and sum all their <val> s. I'm getting the following output: <nodes> <node> <type>A</type> <sum>3</sum> </node> <node> <type>B</type> <sum>2</sum> </node> </nodes> I was expecting a sum (for type A) of 4000, but I'm getting 3 instead. Here's my xslt: <xsl