Re: [xsl] preceding-sibling in a group

Subject: Re: [xsl] preceding-sibling in a group
From: "Martin Honnen martin.honnen@xxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 20 May 2021 20:35:52 -0000
On 20.05.2021 22:20, rick@xxxxxxxxxxxxxx wrote:
The idea is that when I see a NOTE string, I want that entry and all
following within the same group to be <note> elements. So I am look for
preceding-sibling or self that contains NOTE but restricted to the
same group. I am using XSLT 3. Thank you very much.

Perhaps using an inner group-starting-with:

  <xsl:template match="dataroot">
      <xsl:for-each-group select="*" group-by="FIG_NO">
          <xsl:for-each-group select="current-group()"
group-starting-with="*[PART_DES[matches(., 'NOTE')]]">
              <xsl:when test="self::*[PART_DES[matches(., 'NOTE')]]">
                <xsl:iterate select="current-group()">
                <xsl:iterate select="current-group()">

Current Thread