xsl-list
[Top] [All Lists]

Re: [xsl] XSL Processing to avoid repetitions

2010-06-16 09:30:04
Fabien Tillier wrote:

Thanks for your answer, but it doesn't work for me.
I have resent a message with my real data.
Maybe your solution would work if I don't change it to fit my data :)

Andrew already suggested what to do, you simply can nest for-each-group e.g.

<ol>
  <xsl:for-each-group select="/Results/Row" group-by="CONTRACT">
    <li>
      <xsl:value-of select="current-grouping-key()"/>
      <ol>
        <xsl:for-each-group select="current-group()" group-by="CODE">
          <li>
            <xsl:value-of select="current-grouping-key()"/>
            <ol>
              <xsl:for-each select="current-group()/NUMERO">
                <li>
                  <xsl:value-of select="."/>
                </li>
              </xsl:for-each>
            </ol>
          </li>
        </xsl:for-each-group>
      </ol>
    </li>
  </xsl:for-each-group>
</ol>

--

        Martin Honnen
        http://msmvps.com/blogs/martin_honnen/

--~------------------------------------------------------------------
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>
--~--