Referencing to different sibling nodes



How would I achieve this in xsl? I have tried using it with apply-templates but I'm having no luck.


test.xml



<row>
<table name="Person">
<tuple>
<val>BOB</val>
<val>BILL</val>
</tuple>
</table>
<table name="Age">
<tuple>
<val>18</val>
<val>21</val>
</tuple>
</table>
</row>


Desired output



<row>
<data>
<name>BOB</name>
<age>18</age>
</data>
<data>
<name>BILL</name>
<age>21</age>
</data>
</row>

No comments:

Post a Comment