which can be done like this:
Somehow the variable declaration got lost:
<xsl:variable name="verses" select="role/verse"/>
selecting from the parent element of the role elements.
<xsl:for-each-group select="$verses"
group-starting-with="verse[empty(@part)] | verse[(_at_)part='beginning']">
<xsl:variable name="verse-number" select="position()"/>
<verse>
<xsl:for-each select="current-group()">
<part role="parent::role/@name">
<xsl:copy-of select="node()"/>
</part>
</xsl:for-each>
</verse>
</xsl:for-each-group>
Regards,
Michael Kay
http://www.saxonica.com/
http://twitter.com/michaelhkay
--~------------------------------------------------------------------
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>
--~--