xsl-list
[Top] [All Lists]

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

2020-02-05 17:16:05


On 06.02.2020 00:07, Imsieke, Gerrit, le-tex 
gerrit(_dot_)imsieke(_at_)le-tex(_dot_)de 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.
--~----------------------------------------------------------------
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>