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 12th, 2015, 04:10 AM
Registered User
 
Join Date: Apr 2014
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I have a problem where I have an xml content with different keys needs to be grouped together and displayed, when displayed there is a pagination so I can't display all entries on the same page, I'm using for-each-group for grouping the items, and loop through each current-group() and display its item, the xml is something like this:

Code:
<entry>
 <key> key1</key>
 <value> value1</value
</entry>

<entry>
 <key> key2 </key>
 <value> value2</value>
</entry>

<entry>
 <key> ke1 </key>
 <value> value3 </value>
</entry
I need to display something like:

key1
value1
value2

key2
value2

there are a lot of items like this and I need to paginate it 10 at each page, the current xsl without pagination is something like this:

Code:
<xsl:for-each-group select="entry" group-by="key">
    <xsl:value-of select="current-grouping-key()"/>
    <xsl:for-each select="current-grouping()">
           <xsl:apply-templates select="." />
      </xsl:for-each>
</xsl:for-each-group>





Similar Threads
Thread Thread Starter Forum Replies Last Post
for-each-group, group-adjacent confusion CanOfBees XSLT 2 June 28th, 2013 02:50 PM
bunches of nodes, how to group them to different group using the business rules JohnKiller XSLT 9 March 7th, 2012 02:42 PM
No. of groups in for-each-group bsridharg XSLT 1 May 25th, 2010 03:14 AM
Restart new group number in Group Footer sukarso Crystal Reports 2 October 13th, 2006 12:11 PM
Listing members quiksilverhg Excel VBA 1 October 6th, 2005 05:09 AM





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