xsl-list
[Top] [All Lists]

Re: [xsl] Is this a grouping task?

2019-10-22 13:17:33
On 22.10.2019 20:07, Rick Quatro rick(_at_)rickquatro(_dot_)com wrote:


I am using XSLT 2 and think this may require a for-each-group solution.
Any advice would be appreciated. Thank you very much.

Nest two xsl:for-each-group, the outer select="*"
group-starting-with="revst", the inner select="current-group()"
group-ending-with="revend". As with most group-starting-with/ending-with
where there are nodes involved that don't fit the grouping pattern,
inside of the for-each-group you need an additional check with
xsl:choose/xsl:when test="self::revst" or test="self::revend".

To add the attribute, I would push the current-group() through a mode
adding it.
--~----------------------------------------------------------------
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>