Re: [xsl] XSLT2: Grouping mixed content between opening and closing marker elements

Subject: Re: [xsl] XSLT2: Grouping mixed content between opening and closing marker elements
From: "Martin Honnen martin.honnen@xxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Sat, 15 Aug 2020 11:55:57 -0000
Am 15.08.2020 um 12:19 schrieb Keith Burt keithburt66@xxxxxxxxx:

In my simplified example, I have self closing 'e' elements that have a
tag attribute that denotes the start and end points of where style (in
this case bold and italic) shouldB be applied.
I want to group the content within the start and end markers, and create
a wrapper element based on the tag attribute.

That sounds like a grouping task for a nested for-each-group group-starting-with="e" for-each-group group-ending-with="e" with some more precise conditions.

Or in XSLT 3 you could think of xsl:iterate or fold-left.

As Mike has complained that answers in this or other forums don't take
in account the possible complexity and diversity of the input, we have
now to ask you to specify more precisely whether your marker elements
'e' always come as siblings pairs and whether they will be always in the
correct order and pairing before we can dole out code samples trying to
solve the problem :).

Current Thread