[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] xsl:for-each-group question


Subject: Re: [xsl] xsl:for-each-group question
From: "Martin Honnen martin.honnen@xxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 27 Jan 2016 13:38:45 -0000

Markus Ohlenroth markus.ohlenroth@xxxxxxxxxxxxxxxxxxxx wrote:

What values must the select argument and/or the group-starting-with
arguments have in my example

so that the resulting current-group() nodes are <p/> nodes (i.e. the
parent node) instead of <rStyle/> nodes.

Try


<xsl:template match="Root">
<xsl:copy>
<xsl:for-each-group select="p" group-starting-with="p[rStyle[@val='Lemma']]">
<service>
<xsl:copy-of select="current-group()"/>
</service>


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


Current Thread