[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Aw: Re: Using xsl:iterate inside <xsl:for-each-group>

Subject: Aw: Re: 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
Aw: Re:  Using xsl:iterate inside  <xsl:for-each-group>
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.