Shifting row data in xsl 1.0

aa26i

New Member
I have multiple Rows data in my XML like this - \[code\]<ROW TYPE="SPECIFICATION" ID="1"> <R1>English1</R1></ROW><ROW TYPE="SPECIFICATION" ID="1"> <R1>Maths1</R1></ROW><ROW TYPE="TOTAL" ID="1"> <R1>Code1</R1></ROW><ROW TYPE="SPECIFICATION" ID="2"> <R1>English2</R1></ROW><ROW TYPE="SPECIFICATION" ID="2"> <R1>Maths2</R1></ROW><ROW TYPE="TOTAL" ID="2"> <R1>Code2</R1></ROW>\[/code\]I want my Output to be displayed in Image like that this ROW data works in a for-each loop. And the requirement is that ROW TYPE="TOTAL" ID="1" should be displayed first then its ROW TYPE="SPECIFICATION" data. Moving further in loop again, ROW TYPE="TOTAL" ID="2" should be displayed first then its ROW TYPE="SPECIFICATION" data.Basically it should come like this -\[code\]Code1 English1 Maths1Code2 English2 Maths2\[/code\]The XSLT code works for sequence as for-2each loop works. But I need to shift the TOTAL row first for that ID. Please suggest logic for this.
 
Back
Top