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

Re: Process the following group

Subject: Re: Process the following group
From: "rick@xxxxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 8 Jul 2022 13:29:38 -0000
Re:  Process the following group
Hi Eliot, thank you for walking me through the logic. It makes sense so I
will try to code it that way. But I think the advice from you and others to
do a multiple pass may be a more robust approach. Thanks to all that
responded. -Rick

 

From: Eliot Kimber eliot.kimber@xxxxxxxxxxxxxx
<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> 
Sent: Thursday, July 7, 2022 6:11 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re:  Process the following group

 

So the first two div2 elements should be grouped with the first div1?

 

If you do group-starting-with div1 then the first two div2s will be in the
first group and that group will not start with a div1, so you can have logic
to ignore that first group and then in a group that starts with <div1>, you
can pull any <div2> elements that do not have a <div1> preceding sibling,
which will get the <div2>s that would have formed the first group. No
subsequent group will have <div2>s that do not have a <div1> preceding
sibling.

 

But this is also a case where it might be easier to pre-process your content
before grouping, for example, to move things so that there's always a <div1>
before any <div2>s or what ever it might be.

I generally find these kinds of challenges are most effectively solved by
breaking them into several steps, each one of which is relatively easy to
implement.

 

Cheers,

 

E.

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

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.
Email
First Name
Last Name
Company
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.