Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 16th, 2005, 09:15 AM
Authorized User
 
Join Date: Jun 2003
Posts: 57
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Kabe
Default nested muenchian method. Anyone?

have this xml database feed:
<RECORD>
<page_id>products_a</page_id>
<label>brochure</label>
<code>nl</code>
</RECORD>
<RECORD>
<page_id>products_a</page_id>
<label>brochure</label>
<code>fr</code>
</RECORD>
<RECORD>
<page_id>products_a</page_id>
<label>leaflet</label>
<code>nl</code>
</RECORD>
<RECORD>
<page_id>products_b</page_id>
<label>leaflet</label>
<code>nl</code>
</RECORD>
<RECORD>
<page_id>products_b</page_id>
<label>leaflet</label>
<code>fr</code>
</RECORD>

result must be
product a
- brochure: nl, fr
- leaflet: nl
product b
- leaflet: nl, fr

Figured already out how to sort by <product>, but struggling on how to sort in next level, first by <label>, and list for each different <label> all <code>
 
Old March 26th, 2005, 03:24 AM
Authorized User
 
Join Date: Jun 2003
Posts: 57
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Kabe
Default

I have already this for the first level:

<xsl:key name="item-by-product" match="RECORD" use="page_id"/>
[list]
<xsl:for-each select="PAGE/CONTENT/DB/RECORDS[@label = 'downloadsall']/RECORD[count(. | key('item-by-product',page_id)[1]) = 1]">
<li><xsl:value-of select="page_id"/></li>
<xsl:value-of select="page_id"/>
</xsl:for-each>
</ul>

within <li> should start the second loop ...





Similar Threads
Thread Thread Starter Forum Replies Last Post
help with Muenchian method grouping and html table mickhughes XSLT 3 May 1st, 2008 06:24 AM
help with Muenchian method grouping... agentdz015 XSLT 1 April 7th, 2008 04:53 PM
Advanced Grouping Using the Muenchian Method Bodiam XSLT 0 August 8th, 2005 11:33 AM
Grouping XML by Muenchian Method - Urgent :-( xrow XSLT 5 September 28th, 2004 04:07 AM
Best method - Nested data? bridie Classic ASP Databases 4 February 20th, 2004 12:46 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.