就象SQL中的SUM()函数一样,将一个Column的值进行求和。

输入XML:
<ns0:Root xmlns:ns0="http://xslttest.sourcexml/">
<Records>
<A>
<V1>1</V1>
<V2>2</V2>
</A>
<A>
<V1>2</V1>
<V2>3</V2>
</A>
<A>
<V1>3</V1>
<V2>4</V2>
</A>
</Records>
<Records>
<A>
<V1>7</V1>
<V2>8</V2>
</A>
<A>
<V1>8</V1>
<V2>9</V2>
</A>
<A>
<V1>9</V1>
<V2>2</V2>
</A>
</Records>
</ns0:Root>
输出XML:
<ns0:Root xmlns:ns0="http://xslttest.destxml/">
<Records>
<V1_SUM>1,2,3</V1_SUM>
<V2_SUM>9</V2_SUM>
</Records>
<Records>
<V1_SUM>7,8,9</V1_SUM>
<V2_SUM>19</V2_SUM>
</Records>
</ns0:Root>
实例上可以直接用BizTalk Mapping中的Cumulative Sum Functloids,非常简单。
示例下载
