I have an xml similar to the one as follows
<DataSet1>
<Table1>
<Column1>Value111</Column1>
<Column2>Value112</Column2>
</Table1>
<Table1>
<Column1>Value121</Column1>
<Column2>Value122</Column2>
</Table1>
<Table1>
<Column1>Value131</Column1>
<Column2>Value132</Column2>
</Table1>
<Table2>
<Column1>Value211</Column1>
<Column2>Value212</Column2>
</Table2>
<Table2>
<Column1>Value221</Column1>
<Column2>Value222</Column2>
</Table2>
<Table2>
<Column1>Value231</Column1>
<Column2>Value232</Column2>
</Table2>
</DataSet1>
Where Table1 and Table2 are added dynamically in the dataset. So there can be n number of tables in dataset as Tablen.
I want to write xsl which produces the html as follows
Table1
<table>
<tr>
<td>Value111</td>
<td>Value112</td>
</tr>
<tr>
<td>Value121</td>
<td>Value122</td>
</tr>
<tr>
<td>Value131</td>
<td>Value132</td>
</tr>
</table>
Table2
<table>
<tr>
<td>Value211</td>
<td>Value212</td>
</tr>
<tr>
<td>Value221</td>
<td>Value222</td>
</tr>
<tr>
<td>Value231</td>
<td>Value232</td>
</tr>
</table>
Is there any way to select xsl template as select=”DataSet1/Table*” which can match with any table and iterate the structure?
Please help!!!.
This transformation:
when applied on the provided XML document:
produces the wanted, correct result:
Explanation:
Proper use of the Muenchian Grouping method.