[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

RE: [xsl] Grouping repeating elements within repeating elements


Subject: RE: [xsl] Grouping repeating elements within repeating elements
From: Cynthia Arangua <carangua@xxxxxxxxxxx>
Date: Mon, 26 Nov 2007 14:28:45 -0700

I am attaching a new XML since the last email looks to have truncated some of
it.

-----------------------------------------------------------------------------
------------------

< content>
< type content_type =" Listing "/>
< faq_listing>
< heading> Benefits
< heading> Health
< heading> Medical Coverage
< category>
< content_category_faq> Medical Coverage - PPO

< category>
< content_category_faq> Medical Coverage - HMO


< faq_listing>
< heading> Benefits
< heading> Health
< category>
< content_category_faq> Dental


< faq_listing>
< heading> Benefits
< heading> Financial
< category>
< content_category_faq> Flexible Spending


< faq_listing>
< heading> Life Events
< category>
< content_category_faq> Getting Married

< category>
< content_category_faq> Adoption



-----------------------------------------------------------------------------
------------------

----------------------------------------
> From: carangua@xxxxxxxxxxx
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Date: Mon, 26 Nov 2007 13:08:37 -0700
> Subject: [xsl] Grouping repeating elements within repeating elements
>
>
> Hi-
>
> I have been doing XSLT for about four years now and this input XML has me a
little stumped as to how to implement.  I believe I am using Xalan 2.6
(bundled as part of an EMC Documentum product called WebPublisher) and the
only version it supports currently is XSLT 1.0.
>
> Here is the XML input:
>
> < content>
> < type content_type =" Listing "/>
> < faq_listing>
> < heading> Benefits
> < heading> Health
> < heading> Medical Coverage
> < category>
> < content_category_faq> Medical Coverage - PPO
>
> < category>
> < content_category_faq> Medical Coverage - HMO
>
>
> < faq_listing>
> < heading> Benefits
> < heading> Health
> < category>
> < content_category_faq> Dental
>
>
> < faq_listing>
> < heading> Benefits
> < heading> Financial
> < category>
> < content_category_faq> Flexible Spending
>
>
> < faq_listing>
> < heading> Life Events
> < category>
> < content_category_faq> Getting Married
>
> < category>
> < content_category_faq> Adoption
>
>
>
>
> Basically, I need to group any category/content_category_faq under the
appropriate heading designation so like the following:
>
> Benefits
>     Health
>         Medical Coverage
>               Medical Coverage-PPO
>               Medical Coverage-HMO
>         Dental
>      Financial
>           Flexible Spending
> Life Events
>      Getting Married
>      Adoption
>
> I am in the introductory stages on development on this so I don't have any
existing XSL to demonstrate but I am hoping to make some headway today so I
can repost but any initial help would be very cool.  I am working on some
recurse logic as we speak.
>
> Thanks!
> Cindy A.


Current Thread
Keywords