xsl-list
[Top] [All Lists]

Re: [xsl] Feedback on grouping solution

2019-10-26 12:57:30
Fantastic Martin! Thank you very much.

-----Original Message-----
From: Martin Honnen martin(_dot_)honnen(_at_)gmx(_dot_)de 
<xsl-list-service(_at_)lists(_dot_)mulberrytech(_dot_)com> 
Sent: Saturday, October 26, 2019 1:49 PM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: Re: [xsl] Feedback on grouping solution

On 26.10.2019 19:45, Rick Quatro rick(_at_)rickquatro(_dot_)com wrote:

That's an oversight on my part. Any elements outside of step elements 
have to be processed individually. Can I change the for-each-group to 
just group adjacent <step> elements?

Yes, it looks there you just want

<xsl:for-each-group select="*" group-adjacent="boolean(self::step)">
               <xsl:choose>
                   <xsl:when test="current-grouping-key()">
                       use your template here
                   </xsl:when>
                   <xsl:otherwise>
                       <xsl:apply-templates select="current-group()"/>
                   </xsl:otherwise>
               </xsl:choose>
           </xsl:for-each-group>
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--

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