C
Chris Kettenbach
Good Morning,
Sorry for xposting. Just need a liitle help.
I have an xml file that's generated from a database. How do I select
distinct values from a field in xslt and then loop through the records and
produce output. Example
<registrations>
<registration>
<company>Awesome Printers</company>
<first>John</first>
<last>Smith</last>
</registration>
<registration>
<company>Awesome Printers</company>
<first>Bob</first>
<last>Roberts</last>
</registration>
<registration>
<company>Awesome Printers</company>
<first>John</first>
<last>Johnson</last>
</registration>
<registration>
<company>Other Company</company>
<first>Tom</first>
<last>Thomas</last>
</registration>
<registration>
<company>Other Company</company>
<first>Dan</first>
<last>Daniels</last>
</registration>
</registrations>
++++++++++++++++++++++++++++++++++++++++++++++++
I want the out put to be something like this
<table>
<tr>
<td>Company Name</td>
<td>Employees</td>
</tr>
<tr>
<td>Awesome Printers</td>
<td>John Smith<br/>
Bob Roberts<br/>
John Johnson<br/></td>
</tr>
<tr>
<td>Other Company</td>
<td>Tom Thomas<br/>
Dan Daniels<br/></td>
</tr>
</table>
Effectively writing unique company names once and then putting only the
employees from that company into the employee table cell.
Thanks for any advise.
Regards,
Chris
Sorry for xposting. Just need a liitle help.
I have an xml file that's generated from a database. How do I select
distinct values from a field in xslt and then loop through the records and
produce output. Example
<registrations>
<registration>
<company>Awesome Printers</company>
<first>John</first>
<last>Smith</last>
</registration>
<registration>
<company>Awesome Printers</company>
<first>Bob</first>
<last>Roberts</last>
</registration>
<registration>
<company>Awesome Printers</company>
<first>John</first>
<last>Johnson</last>
</registration>
<registration>
<company>Other Company</company>
<first>Tom</first>
<last>Thomas</last>
</registration>
<registration>
<company>Other Company</company>
<first>Dan</first>
<last>Daniels</last>
</registration>
</registrations>
++++++++++++++++++++++++++++++++++++++++++++++++
I want the out put to be something like this
<table>
<tr>
<td>Company Name</td>
<td>Employees</td>
</tr>
<tr>
<td>Awesome Printers</td>
<td>John Smith<br/>
Bob Roberts<br/>
John Johnson<br/></td>
</tr>
<tr>
<td>Other Company</td>
<td>Tom Thomas<br/>
Dan Daniels<br/></td>
</tr>
</table>
Effectively writing unique company names once and then putting only the
employees from that company into the employee table cell.
Thanks for any advise.
Regards,
Chris