Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


[xsl] Grouping by attribute values

From: "Josh Taylor" <jktylr@----------->
To:
Date: 3/1/2005 1:39:00 PM
I have the following problem. My XML is structured in the following way:



<?xml version="1.0" encoding="UTF-8"?>

<ratePremiums rateDate="20041001" territory="100" type="1">

<coverage id="Liability">

 <premium class="1" drivingRecord="0" 
limit="200">820.7014415999998</premium>

 <premium class="1" drivingRecord="0" 
limit="300">853.5294992639998</premium>

 <premium class="1" drivingRecord="1" 
limit="200">805.7559679999999</premium>

 <premium class="1" drivingRecord="1" 
limit="300">837.9862067199999</premium>

.....

 <premium class="12" drivingRecord="2" limit="200">0.0</premium>

 <premium class="12" drivingRecord="2" limit="300">0.0</premium>

<coverage>

</ratePremiums>



I need to display premiums grouped first by class, then by driving record 
and then by limit in

HTML tables.



So a table for each class, a row for each driving record and a column for 
each limit (much like an engineering table).



To elaborate: Desired output for the snipet above is:

Class 1:

<table>

 <tr><th></th><th>200 K</th><th>300 K</th></tr>

 <tr><td>DR = 
0</td><td>820.7014415999998</td><td>853.5294992639998</td></tr>

 <tr><td>DR = 
0</td><td>805.7559679999999</td><td>837.9862067199999</td></tr>

 ....

</table>

.... etc.



I have no idea how to loop through the premiums, isolated a unique class to 
create a table. Then for that class loop through unique driving record 
values and display the premiums according to limit.



I do not want to structure my XML with this table view in mind.



Thank you for your time!



- Josh Taylor


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent