0
輸入XML
<Root>
<Number>1</Number>
<Reference>100</Reference>
<Number>2</Number>
<Reference>101</Reference>
<Number>3</Number>
<Reference>100</Reference>
<Number>4</Number>
<Reference>102</Reference>
<Number>5</Number>
<Reference>100</Reference>
</Root>
預期輸出:
<Root>
<Number>1</Number>
<Reference>100</Reference>
<RefNumber>1</RefNumber>
<Number>2</Number>
<Reference>101</Reference>
<RefNumber>1</RefNumber>
<Number>3</Number>
<Reference>100</Reference>
<RefNumber>2</RefNumber>
<Number>4</Number>
<Reference>102</Reference>
<RefNumber>1</RefNumber>
<Number>5</Number>
<Reference>100</Reference>
<RefNumber>3</RefNumber>
</Root>
如何分組基於根/參考做,並添加序列號,RefNumber在xslt 1.0中輸出?
由於提前做這個
嗨..它是分組的序列號,比如參考= 100它是1,2,3 [即100的出現次數] –