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? –