XSLT merging/concatenating values of siblings nodes of same name into single node
问题 Input xml <catalog> <product id="1"> <name>abc</name> <category>aaa</category> <category>bbb</category> <category>ccc</category> </product> <product id="2"> <name>cde</name> <category>aaa</category> <category>bbb</category> </product> </catalog> Expected Output xml <products> <product> <id>1</id> <name>abc</name> <category>aaa,bbb,ccc</category> </product> <product> <id>2</id> <name>cde</name> <category>aaa,bbb</category> </product> </products> XSLT for transformation <xsl:stylesheet version=