Now I need to combine all the "Table" elements where their subelement Zoo_ID has the same value to produce something like:
<Table>
<tr>
<td>Name</td><td> Chimpanzee</td>
</tr>
<tr>
<td>Name</td><td> African Lion</td>
</tr>
<tr>
<td>Zoo Name</td><td>Brighton Zoo</td>
</tr>
<tr>
<td>Zoo Post Code</td><td>BN13LW</td>
</tr>
</Table>
<Table>
<tr>
<td>Name</td><td>Bengal Tiger</td>
</tr>
<tr>
<td>Zoo Name</td><td>Brighton Zoo</td>
</tr>
<tr>
<td>Zoo Post Code</td><td>BN13LW</td>
</tr>
</Table>
but I am unsuccesful creating a template to do so. Can you give me some pointers?
Subject:Combining XML elements based on sub-element value Author:stelios kous Date:06 Jan 2009 10:03 AM
Hi Alberto,
Thank you for your reply and the link. The issue that puzzles me is how to get the value of "all" the Zoo_IDs in my XML and then group by each of those. As the values come from a Database and this transformation is done programmaticaly I am unsure how to create multiple groupings each by the ZOO_ID.
Apologies for my ignorance but quite new to XSLT and it is difficult to get my head around it at the moment