xsl-list
[Top] [All Lists]

Re: [xsl] Grouping help

2012-08-15 15:30:20

<table>
<rows>
<row seq="4521">
<cell colNum="1">Partslist</cell>
<cell colNum="2">36MV0</cell>
<cell colNum="3">S-33C-425SP</cell>
<cell colNum="4">MAAMAMAMA</cell>
<cell colNum="5">01</cell>
<cell colNum="6">P</cell>
<cell colNum="7">6EL</cell>
<cell colNum="8">0</cell>
<cell colNum="9">0100 001</cell>
<cell colNum="10">1</cell>
...
I've written this, but my output isn't what I'm wanting or expecting.

 <xsl:template match="table">
   <xsl:for-each-group select="*" group-by="cell[@colNum='10']">

Don't kick yourself too hard, but I think you simply need:

    select="rows/row"

As you have it now, you are grouping <rows> elements and not <row> elements.

I hope this helps.

. . . . . . . . . . . Ken


--
Public XSLT, XSL-FO, UBL and code list classes in Europe -- Oct 2012
Contact us for world-wide XML consulting and instructor-led training
Free 5-hour lecture: http://www.CraneSoftwrights.com/links/udemy.htm
Crane Softwrights Ltd.            http://www.CraneSoftwrights.com/s/
G. Ken Holman                   mailto:gkholman(_at_)CraneSoftwrights(_dot_)com
Google+ profile: https://plus.google.com/116832879756988317389/about
Legal business disclaimers:    http://www.CraneSoftwrights.com/legal


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>