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

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

Subject: 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 16:36:35 -0000
Re:  Using xsl:iterate inside <xsl:for-each-group> xslt
Am 18.08.2020 um 18:14 schrieb Terry Ofner tdofner@xxxxxxxxx:
Interesting tangle I am in. I tried the map:merge in both the iterate
and apply-templates solutions. I can indeed reference the bpb and pull
it into the output.B However, it seems to play havoc with the $groups
output. Here is the changed iterate:

 B  B  B  B  B  B  B  B  B  B  B <xsl:iterateselect="p[@class = 'nl'] !
map:merge(($groups, map
 B  B  B  B  B  B  B  B  B  B  B  B  { 'p' : . }))">
<xsl:text>&#10;</xsl:text>
<write_choiceB  num="{position() - 1}"letter="{?letter}"
 B  B  B  B  B  B  B  B  B  B  B  B  B  B  term="{?term}"item="{?p}"/>
</xsl:iterate>

Yes, sorry, I got lost in my own suggestion, the right code should be


<xsl:apply-templates
        select="for $p in p[@class = 'nl']
                return $groups
                       !
                       map:merge(
                         ($groups,
                          map { 'p' : $p })
                       )"/>

or the same expression for the iterate.

$groups is a sequence of maps we want to process for each "p" and
including the "p" in each map of the sequence is what we need, not to
merge the sequence of maps.

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.