Re: [xsl] Grouping "span" with same @class within mixed content element

Subject: Re: [xsl] Grouping "span" with same @class within mixed content element
From: David Carlisle <davidc@xxxxxxxxx>
Date: Mon, 20 Dec 2010 20:40:38 +0000
On 20/12/2010 17:47, Matthieu Ricaud-Dussarget wrote:

what about text()[normalize-space()], i never seen such a predicate, does the normalized-text directly ?

in your sample answer you considered two spans with the same class as adjacent if they were separated by white space.


select="node()" group-adjacent="string(@class)"

would not have considered them adjacent.


so rather than select=node() I used select="text()[normalize-space()]|* which selects just non-white text nodes and elements. In the sequence selected by that expression, the spans with the same class are adjacent as the indentation is not selected


David

Current Thread