Subject: Re: [xsl] Process the following group From: "rick@xxxxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Fri, 8 Jul 2022 13:29:38 -0000 |
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: [xsl] 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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Process the following gro, Eliot Kimber eliot.k | Thread | Re: [xsl] Process the following gro, Wendell Piez wapiez@ |
Re: [xsl] XPath expression to conve, Liam R. E. Quin liam | Date | Re: [xsl] Process the following gro, Wendell Piez wapiez@ |
Month |