[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Grouping

Subject: Re: Grouping
From: "Christoph Naber pentium120mhz@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 21 Oct 2020 15:57:31 -0000
Re:  Grouping
Hello Martin,

thank you for your reply!

The group-wrap should be performed for sequences of <points> of @type = '1'. <Points> of other types and completeley other nodes should not be grouped.

The "group-adjacent" solution seemes obvious but I have to account for various parent elements that all have different templates. Wouldn't using the group-adj. solution mean that I have to edit each and every template that can possibly contain <points>?

Thank you in advance!

Best regards


Am 21.10.2020 um 17:42 schrieb Martin Honnen martin.honnen@xxxxxx:
Am 21.10.2020 um 17:25 schrieb Christoph Naber pentium120mhz@xxxxxxxxx:

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?

B  <xsl:template match="*[point]">
B B B  <xsl:copy>
B B B B B  <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.

Current Thread


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.