Re: [xsl] Grouping paragraphs and sections in XSLT 2.0

Subject: Re: [xsl] Grouping paragraphs and sections in XSLT 2.0
From: Martin Honnen <Martin.Honnen@xxxxxx>
Date: Thu, 08 Dec 2011 14:10:59 +0100
neil.crofts@xxxxxxxxxxxxxxxxxx wrote:

My latest attempt is still not there:

     <xsl:template match="test">
         <xsl:for-each-group select="paragraph | section"
                             group-starting-with="section">

If you do
<xsl:for-each-group select="*" group-adjacent="boolean(self:paragraph)">
instead of the group starting-with I think you get what you want.


             <GROUP>
                 <xsl:copy-of select="current-group()"/>

             </GROUP>
         </xsl:for-each-group>
     </xsl:template>


--

	Martin Honnen --- MVP Data Platform Development
	http://msmvps.com/blogs/martin_honnen/

Current Thread