Re: [xsl] Finding Only Initial Following Siblings That Meet Some Criteria

Subject: Re: [xsl] Finding Only Initial Following Siblings That Meet Some Criteria
From: "Imsieke, Gerrit, le-tex gerrit.imsieke@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 5 Feb 2020 23:16:01 -0000
On 06.02.2020 00:07, Imsieke, Gerrit, le-tex gerrit.imsieke@xxxxxxxxx wrote:
But as I wanted to say above, in terms of idiomatic XSLT 2+ purity, I'd always prefer a solution that doesn't look along the preceding/following axes, even when it is done just once for selecting the for-each-group population.

On a more practical than ideological note, selecting the parent and grouping the children often greatly helps avoid duplicated content. This is so because you cannot just do an apply-templates over all nodes within p. You need to be careful which node isn't replicated because it is already considered by the following-sibling grouping. On the other hand, you cannot just restrict yourself to processing the first ph[@outputclass] child because you need to process its preceding-siblings, too.


Current Thread