xsl-list
[Top] [All Lists]

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

2020-08-15 06:56:03
Am 15.08.2020 um 12:19 schrieb Keith Burt keithburt66(_at_)gmail(_dot_)com:

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) should 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 :).




--~----------------------------------------------------------------
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>