Topic
No replies
SystemAdmin
SystemAdmin
76 Posts
ACCEPTED ANSWER

Pinned topic Combining List Members

‏2003-09-16T05:15:48Z |
I'm trying to convert XML from DTD "A" to DTD "B" using a stylesheet. I have several nodes(A, B and C) that contain lists of items. I want to combine the first item from each node(A1, B1 and C1) into a new item D1. Then the second item from each node (A2, B2 and C2) into a new item D2 and so on. How do I do this?

The XML input fragment is:
code...
<A><textlist>
<item>value1</item><item>value2</item><item>value3</item>
</textlist></A>
<B><textlist>
<item>value4</item><item>value5</item><item>value6</item>
</textlist></B>
<C><textlist>
<item>value7</item><item>value8</item><item>value9</item>
</textlist></C>
[/code]
The output would be:code
<result><textlist>
<item>value1Value4Value7</item>
<item>value2Value5Value8</item>
<item>value3Value6Value9</item>
</textlist></result>[/code]