我正在尝试按项目 ID 对一些 xml 进行分组
我可以使用 xslt v 2.0
我想我需要使用for-each-group但我找不到类似的示例(因为父元素)
这是示例数据
<projects>
<project>
<id>141</id>
<name>Project 141</name>
<identifier>am-1000171</identifier>
<description>Project 141</description>
</project>
<project>
<id>120</id>
<name>Project 120</name>
<identifier>am-1000199</identifier>
<description>Project 120</description>
</project>
<project>
<id>109</id>
<name>Project 109</name>
<identifier>am-1000143</identifier>
<description>Project 108</description>
<parent id="141" name="Project 141" />
</project>
<project>
<id>53</id>
<name>Project 53</name>
<identifier>am-1000101</identifier>
<description>Project 53</description>
<parent id="141" name="Project 141" />
</project>
<project>
<id>24</id>
<name>Project 25</name>
<identifier>am-1000019</identifier>
<description>Project 24</description>
<parent id="53" name="Project 53" />
</project>
</projects>
输出需要如下所示
120
141
> 53
>> 24
> 109
是否有任何人可以指点我以了解如何解决的示例?谢谢