xsl-list
[Top] [All Lists]

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

2011-12-08 07:11:10
neil(_dot_)crofts(_at_)thomsonreuters(_dot_)com 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/

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