xml 摘录(http://pastebin.com/HDrmzctC上的完整示例 xml ):
<log>
<event>
<when>2012-10-26T21:32:52</when>
<what>
<item>food</item>
<money>10</money>
</what>
</event>
<event>
<when>2012-10-26T21:32:52</when>
<what>
<item>beer</item>
<money>20</money>
</what>
</event>
<event>
<when>2012-10-27T21:32:52</when>
<what>
<item>food</item>
<money>10</money>
</what>
</event>
<event>
<when>2012-10-27T21:32:52</when>
<what>
<item>beer</item>
<money>20</money>
</what>
</event>
<event>
<when>2012-11-26T21:32:52</when>
<what>
<item>food</item>
<money>11</money>
</what>
</event>
<event>
<when>2012-11-26T21:32:52</when>
<what>
<item>beer</item>
<money>22</money>
</what>
</event>
<event>
<when>2012-11-27T21:32:52</when>
<what>
<item>food</item>
<money>11</money>
</what>
</event>
<event>
<when>2012-11-27T21:32:52</when>
<what>
<item>beer</item>
<money>22</money>
</what>
</event>
</log>
期望产量:
2012-10 食品 20
2012-10 啤酒 40
2012-11 食品 22
2012-11 啤酒 44
还是因为xml设计错误而导致xsl不简单?