Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries [Thread Prev] >Thread Next - Re: Grouping Sub Elements with XSLT Grouping Sub Elements with XSLTTo: NULL Date: 10/14/2008 8:24:00 AM Guys, I'm hoping you can help with the following problem - I have an input file as follows: <FlatFileSchema> <Line> <Centres> <CentreNo>DE614</CentreNo> </Centres> <Country>Germany</Country> </Line> <Line> <Centres> <CentreNo>DE614</CentreNo> <CentreNo>DE617</CentreNo> </Centres> <Country>Germany</Country> </Line> <Line> <Centres> <CentreNo>ID081</CentreNo> </Centres> <Country>Indonesia</Country> </Line> <Line> <Centres> <CentreNo>ID090</CentreNo> <CentreNo>ID092</CentreNo> </Centres> <Country>Indonesia</Country> </Line> </FlatFileSchema> and I want to create a grouped output file as follows: <Grouping> <Country name="Germany"> <CentreNo>DE614</CentreNo> <CentreNo>DE617</CentreNo> </Country> <Country name="Indonesia"> <CentreNo>ID081</CentreNo> <CentreNo>ID090</CentreNo> <CentreNo>ID092</CentreNo> </Country> </Grouping> Can you offer any advice on the best method using XSLT 1.0 (unfortunately, I can't use 2.0 :-() I have tried looking into Muenchian Method to perform the grouping, but I'm getting horribly lost - any advice is greatly appreciated. Kind regards, Nick. | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
