我有一个示例 xml 文件,其中根具有名称为“元素”的元素。这个元素可以嵌套。
我想排除名称为“位置”的元素,其中“位置”值 x =(“数字”+“另一个”)*计数大于总和的平均值((“数字”+“另一个”)*“计数”)来自所有“位置”元素。
如何使用 xslt v 1 处理此 xml 文件。
<?xml version="1.0" encoding="utf-8" ?>
<root>
<element>
<position>
<number>
1
</number>
<another>
2
</another>
<count>
3
</count>
</position>
<position>
<number>
3
</number>
<another>
1
</another>
<count>
5
</count>
</position>
<element>
<position>
<number>
3
</number>
<another>
3
</another>
<count>
5
</count>
</position>
<position>
<number>
3
</number>
<another>
6
</another>
<count>
5
</count>
</position>
<element>
<position>
<number>
3
</number>
<another>
3
</another>
<count>
5
</count>
</position>
<position>
<number>
3
</number>
<another>
7
</another>
<count>
5
</count>
</position>
<element>
<position>
<number>
33
</number>
<another>
4
</another>
<count>
5
</count>
</position>
<position>
<number>
34
</number>
<another>
3
</another>
<count>
5
</count>
</position>
</element>
</element>
</element>
</element>
<element>
<position>
<number>
5
</number>
<another>
1
</another>
<count>
2
</count>
</position>
<position>
<number>
3
</number>
<another>
3
</another>
<count>
9
</count>
</position>
<element>
<position>
<number>
5
</number>
<another>
3
</another>
<count>
2
</count>
</position>
<position>
<number>
3
</number>
<another>
3
</another>
<count>
5
</count>
</position>
</element>
</element>
</root>