Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


RE: [xsl] Assistance with hiding duplicate data

From: "Michael Kay" <mike@------------>
To:
Date: 9/4/2008 8:27:00 PM
The problem is known as "grouping", and if you google for "XSLT grouping"
(or search the archives of this list at www.markmail.org, or look in the
index of your favourite XSLT textbook) you will find a copious literature on
the subject. It's easiest in XSLT 2.0 using the xsl:for-each-group
instruction.

Michael Kay
http://www.saxonica.com/ 

> -----Original Message-----
> From: Garrett Murphy [mailto:gmurphy@xxxxxxxxxxxx] 
> Sent: 04 September 2008 20:53
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: [xsl] Assistance with hiding duplicate data
> 
> I've combed these boards over and can't find anything that 
> particularly helps with this exact issue.
>  
> Data:
> <report>
>    <record>
>        <Beneficiary_Name>Canada, Peter</Beneficiary_Name>
>        <Case_No>0606-0000000055</Case_No>
>        <Current_Status>-</Current_Status>
>        <Current_Status_Expires></Current_Status_Expires>
>        <Birth_Date>05/27/1971</Birth_Date>
>        <Case_Opened>06/14/2006</Case_Opened>
>        <Responsible_Attorney>NR</Responsible_Attorney>
>    </record>
>    <record>
>        <Beneficiary_Name>Mexico, Ron</Beneficiary_Name>
>        <Case_No>0608-0000000275</Case_No>
>        <Current_Status>H-1B</Current_Status>
>        <Current_Status_Expires>00/00/00</Current_Status_Expires>
>        <Birth_Date>May 26, 19</Birth_Date>
>        <Case_Opened>08/23/2006</Case_Opened>
>        <Responsible_Attorney>HI</Responsible_Attorney>
>    </record>
>    <record>
>        <Beneficiary_Name>Canada, Peter</Beneficiary_Name>
>        <Case_No>0606-0000000055</Case_No>
>        <Current_Status>-</Current_Status>
>        <Current_Status_Expires>xxxxxxxxxx</Current_Status_Expires>
>        <Birth_Date>05/27/1971</Birth_Date>
>        <Case_Opened>09/05/2006</Case_Opened>
>        <Responsible_Attorney>HI</Responsible_Attorney>
>    </record>
>    <record>
>        <Beneficiary_Name>Mexico, Ron</Beneficiary_Name>
>        <Case_No>0608-0000000275</Case_No>
>        <Current_Status>H-1B</Current_Status>
>        <Current_Status_Expires>00/00/00</Current_Status_Expires>
>        <Birth_Date>May 26, 19</Birth_Date>
>        <Case_Opened>09/18/2006</Case_Opened>
>        <Responsible_Attorney>HI</Responsible_Attorney>
>    </record>
>    <record>
>        <Beneficiary_Name>Mexico, Ron</Beneficiary_Name>
>        <Case_No>0608-0000000275</Case_No>
>        <Current_Status>H-1B</Current_Status>
>        <Current_Status_Expires>00/00/00</Current_Status_Expires>
>        <Birth_Date>May 26, 19</Birth_Date>
>        <Case_Opened>09/21/2006</Case_Opened>
>        <Responsible_Attorney>HI</Responsible_Attorney>
>    </record>
>    <record>
>        <Beneficiary_Name>Canada, Peter</Beneficiary_Name>
>        <Case_No>0606-0000000055</Case_No>
>        <Current_Status>-</Current_Status>
>        <Current_Status_Expires>xxxxxxxxxx</Current_Status_Expires>
>        <Birth_Date>05/27/1971</Birth_Date>
>        <Case_Opened>09/18/2006</Case_Opened>
>        <Responsible_Attorney>[R]TADC</Responsible_Attorney>
>    </record>
>    <record>
>        <Beneficiary_Name>Canada, Peter</Beneficiary_Name>
>        <Case_No>0606-0000000055</Case_No>
>        <Current_Status>-</Current_Status>
>        <Current_Status_Expires>xxxxxxxxxx</Current_Status_Expires>
>        <Birth_Date>05/27/1971</Birth_Date>
>        <Case_Opened>09/18/2006</Case_Opened>
>        <Responsible_Attorney>NR</Responsible_Attorney>
>    </record>
> </report>
> 
> At my work, we generate reports from a system that generates 
> XML and we then use the XSL to format the reports.  Users are 
> able to choose the columns they wish.
> I'm trying to arrange it so that the data is generated in a 
> table sorted by the Beneficiary_Name, and without any 
> duplicated data for the beneficiary.  So, in the case of 
> Peter Canada, the first record of his that shows would have 
> all the fields filled in, but each record after that would 
> only have Case_Opened and Responsible_Attorney, as those are 
> the only ones changing.
>  
> I've tried several different techniques, but I'm having no 
> luck at all.
> Any suggestions?
>  
>  
> 
> Garrett Murphy
> gmurphy@xxxxxxxxxxxx


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