Aw: Re: [xsl] Using xsl:iterate inside <xsl:for-each-group> xslt 3.0

Subject: Aw: Re: [xsl] Using xsl:iterate inside <xsl:for-each-group> xslt 3.0
From: "Martin Honnen martin.honnen@xxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 18 Aug 2020 14:55:24 -0000
Doesn't the use of position() suffice to have the item number?

--
Diese Nachricht wurde von meinem Android Mobiltelefon mit GMX Mail
gesendet.Am 18.08.20, 16:09 schrieb "Terry Ofner tdofner@xxxxxxxxx"
<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>:

  Is it possible to reference elements in p[@class=bnlb] (to the
  left of the ! $groups) in the iterate? Or to pass a parameter
  including the item number of the p[@class=bnlb] to the iterate.
  The selected node of the iterate is <p=class=bDirectionsb>.

    On Aug 13, 2020, at 3:55 PM, Martin Honnen martin.honnen@xxxxxx <xsl-list-service@lists.
    mulberrytech.com> wrote:
    <xsl:template match="set[p[@class = 'nl']]">

       <xsl:variable name="groups" as="map(xs:string, element())*">
         <xsl:for-each-group select="p[@class = 'directions']/*"
    group-starting-with="span[@class = 'letter']">
           <xsl:sequence select="map { 'letter' : ., 'term' :
    current-group()[2] }"/>
         </xsl:for-each-group>
       </xsl:variable>

       <write_choices>
         <xsl:iterate select="p[@class = 'nl'] ! $groups">
           <write_choice num="{position() - 1}" letter="{?letter}"
    term="{?term}"/>
         </xsl:iterate>
       </write_choices>
     </xsl:template>

  XSL-List info and archiveEasyUnsubscribe (by email)

XSL-List info and archiveEasyUnsubscribe (by email)

Current Thread