首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 企业软件 > 企业开发 >

biztalk 中如若作group by

2013-01-04 
biztalk 中如果作group by原文件customer1,order1,10customer1,order2,30目标文件customer1,40原文件2行记

biztalk 中如果作group by
原文件
customer1,order1,10
customer1,order2,30

目标文件
customer1,40

原文件2行记录,新文件1行记录,并对数量作累加(10+30=40)。

mapping的时候要用哪个FUNCTIONID,或者怎么设置。

多谢
[解决办法]
把你FF变成的xml文档
<xml>
<x customer="customer1" order="order1" n="10"/>
<x customer="customer1" order="order2" n="30"/>
</xml>
xslt文件:
  <xsl:for-each-group select="xml/x" group-by="@customer">
    <tr>
      <td><xsl:value-of select="@customer"/></td>
      <td>
        <xsl:value-of select="current-group()/@order" separator=", "/>
      </td>
      <td><xsl:value-of select="sum(current-group()/@n)"/></td>
    </tr>
  </xsl:for-each-group>
结果:
<table>
   <tr>
      <th>customer1</th>
      <th>order1,order2</th>
      <th>40</th>
   </tr>
</table>

热点排行