xsl-list
[Top] [All Lists]

Re: [xsl] Grouping

2020-10-21 10:42:27
Am 21.10.2020 um 17:25 schrieb Christoph Naber 
pentium120mhz(_at_)gmail(_dot_)com:

the question of Charlie brought me to thinking about a problem and
solution that I came up with a few years ago.
A few words upfront:
- This is a _very_ stripped down example which doesn't reflect the
complete structure. I hope that I was able to retain all relevant
structural attributes that shape the solution.
- I included <parentA> and <parentB> in the example to account for the
fact that there are at least 20 different parents where the relevant
<points> can occur as childs. It's also possible that a parent holds
relevant <points>, completely different nodes and also another parent.
- I don't want to include <xsl:for-each-group > in every possible parent
for the sake of maintainability. Because of the loads of different child
nodes it seems to me atm that it's not sensible to write specialized
select-statements in apply-templates. Just select="@* | node()" and let
the child-nodes "somehow" take care of themselves.

Can you explain the criteria to "group"/wrap "point" elements without
having to infer that from the XSLT you posted?

Using
  <xsl:template match="*[point]">
    <xsl:copy>
      <xsl:for-each-group select="*" group-adjacent="...">
in my view seems preferable but I haven't quite understood which point
elements have to be wrapped.
--~----------------------------------------------------------------
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>
  • [xsl] Grouping, Christoph Naber pentium120mhz(_at_)gmail(_dot_)com
    • Re: [xsl] Grouping, Martin Honnen martin(_dot_)honnen(_at_)gmx(_dot_)de <=