Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > XML > XSLT
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 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 .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 16th, 2005, 09:15 AM
Authorized User
 
Join Date: Jun 2003
Location: Gent, , Belgium.
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>
Reply With Quote
  #2 (permalink)  
Old March 26th, 2005, 03:24 AM
Authorized User
 
Join Date: Jun 2003
Location: Gent, , Belgium.
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 ...
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 09:28 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.