Aw: Re: [xsl] Using xsl:iterate inside <xsl:for-each-group> xslt 3.0
2020-08-18 09:55:30
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(_at_)gmail(_dot_)com" <xsl-list-service(_at_)lists(_dot_)mulberrytech(_dot_)com>:
Is it possible to reference elements in p[@class=‘nl’] (to the left of the ! $groups) in the iterate? Or to pass a parameter including the item number of the p[@class=’nl’] to the iterate. The selected node of the iterate is <p=class=‘Directions’>.
<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>
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- Aw: Re: [xsl] Using xsl:iterate inside <xsl:for-each-group> xslt 3.0,
Martin Honnen martin(_dot_)honnen(_at_)gmx(_dot_)de <=
|
|
|