[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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>
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|