0
对于我原来的XML,我有这样的:XSLT按唯一元素值分组?
<Data>
<Statistic>
<Title>Total Values</Title>
<Type>Type A</Type>
<Key>Cases</Key>
<Value>3</Value>
</Statistic>
<Statistic>
<Title>PHYSICIAN DETAIL TOTAL</Title>
<Type>Type A</Type>
<Key>Percentage</Key>
<Value>75.0%</Value>
</Statistic>
<Statistic>
<Title>Total Values</Title>
<Type>Type B</Type>
<Key>Cases</Key>
<Value>1</Value>
</Statistic>
<Statistic>
<Title>Total Values</Title>
<Type>Type B</Type>
<Key>Percentage</Key>
<Value>25.0%</Value>
</Statistic>
</Data>
基本上,对于每种类型的,只会有一个“案例”和一个“百分比”。 最终的XML看起来像:
<Data>
<Statistic>
<Title>Total Values</Title>
<Type>Type A</Type>
<count>
<Case>1</Case>
<Percentage>75%</Percentage>
</count>
</Statistic>
<Statistic>
<Title>Total Values</Title>
<Type>Type B</Type>
<count>
<Case>1</Case>
<Percentage>25%</Percentage>
</count>
</Statistic>
</Data>
什么是实现这一目标的最佳方式是什么? XSLT组通过?
xslt 1.0或2.0? – Lukasz
对于' A型 ',为什么它应该选择'
类型A的情况值不应该是3吗?为什么在预期产出的清单中将其作为1? –