You are currently viewing the BOOK: XSLT Programmer's Reference, 2nd Edition section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
You need to provide a clearer description of your problem. The subject line suggests it is about nested grouping, the message itself suggests it is about compound grouping keys. The best way to describe your problem is to show its input and desired output.
You also need to show your attempt at a solution. Without this, we can't tell you why it's failing. Showing us your code is the best way for us to see what you already know and what you still need to learn.
All grouping problems, of course, are much easier in XSLT 2.0, so before embarking on a 1.0 solution it's useful to explain why 2.0 isn't an option.
Michael Kay http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference
The Xml is coming some what following manner
<NewDataSet>
- <Customers>
<CompanyName>Cactus Comidas para llevar</CompanyName>
<Country>Argentina</Country>
<City>Buenos Aires</City>
<CustomerID>CACTU</CustomerID>
</Customers>
- <Customers>
<CompanyName>Océano Atlántico Ltda.</CompanyName>
<Country>Argentina</Country>
<City>Buenos Aires</City>
<CustomerID>OCEAN</CustomerID>
</Customers>
- <Customers>
<CompanyName>Rancho grande</CompanyName>
<Country>Argentina</Country>
<City>Buenos Aires</City>
<CustomerID>RANCH</CustomerID>
</Customers>
- <Customers>
<CompanyName>Piccolo und mehr</CompanyName>
<Country>Austria</Country>
<City>Salzburg</City>
<CustomerID>PICCO</CustomerID>
</Customers>
- <Customers>
<CompanyName>Ernst Handel</CompanyName>
<Country>Austria</Country>
<City>Graz</City>
<CustomerID>ERNSH</CustomerID>
</Customers>
- <Customers>
I want the report in the following format
germany-----//Country
Aachen----//City
Drachenblut Delikatessen---//Company
DRACD---//Customers
Company2
customers..
customers..
.
.
.
Berlin
Alfreds Futterkiste
ALFKI
.
.
FRANCE
Paris
Spécialités du monde
SPECD
.
.
.
.
Like wise I want multi level grouping using XSLT1.0
I have tried with meunchian grouping method but its only working with two level with concat,
but I m not able to implement it. if something can be done using axes then also please suggest.
I know it's a bit of a skimpy presentation, but it's more detailed than I've got time for - I'm afraid that grouping using XSLT 1.0 is something that doesn't get me excited.
Michael Kay http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference