xsl-list
[Top] [All Lists]

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

2020-08-18 12:59:56
Am 18.08.2020 um 19:56 schrieb Terry Ofner tdofner(_at_)gmail(_dot_)com:
Hmm. The map:merge appears to fiddle with the ?letter and the ?term. It
appears that the position() is coming from the $groups map. Not sure why
the letter is stuck on S and the term on sentence. Do I need an argument
within the map merge to tell how to merge the two?

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

<xsl:text>&#10;</xsl:text>
<write_choice  spanNum="{position() - 1}"letter="{?letter}"
                             term="{?term}"ans="{?p}"/>
</xsl:iterate>

I got the select wrong again, the following hopefully does what I tried
to implement:

      <xsl:apply-templates
        select="for $p in p[@class = 'nl']
                return $groups
                       !
                       map:merge(
                         (.,
                          map { 'p' : $p })
                       )"/>
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--

<Prev in Thread] Current Thread [Next in Thread>