[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: group-by sorting and paging problem...

Subject: Re: group-by sorting and paging problem...
From: Robert Wilkins <wilkins.robert@xxxxxxxxxxx>
Date: Fri, 15 Dec 2006 22:59:47 -0500
 Re: group-by sorting and paging problem...
Note: xml posted previously for clarity. Close the white space between blocks for the xml to work properly.

I tried Jenni Tennison's approach and it works... I can group things based on the position() of the group size mod, but I still have to stick the cols and rows in the middle of the html... that I don't quite get. I'm missing something here...the logic is match the messages, sort the msgblocks, then group by position() test. The middle stuff... starting and ending the html - that is the problem...


<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">


    <xsl:param name="start-index" select="number(1)"/>
    <xsl:param name="group-size" select="number(7)"/>

    <xsl:template match="messages">
        <xsl:apply-templates select="msgblock">
            <xsl:sort select="@id"/>
        </xsl:apply-templates>
    </xsl:template>

    <xsl:template  match="msgblock">
        <xsl:if test="position() mod $group-size =1">

            <!-- write html tags for each group starting
                 where the mod of the position() is 1...
                 this groups things properly
              -->

           <html>
               <head></head>
               <body>
                   <table></table>
               </body>
           </html>
        </xsl:if>
            <!-- this writes the right cols and rows, but how
                 do I stick this in the middle of the html?
            -->
        <tr>
            <td>
                <xsl:value-of select="errnum"></xsl:value-of>
            </td>
        </tr>
        <tr>
            <td>
                <xsl:value-of select="message"></xsl:value-of>
            </td>
        </tr>
    </xsl:template>
</xsl:stylesheet>

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.