Subject: Re: [xsl] Grouping "span" with same @class within mixed content element From: Matthieu Ricaud-Dussarget <matthieu.ricaud@xxxxxxxxx> Date: Tue, 21 Dec 2010 13:03:04 +0100 |
If I understood well, in my sample : <span class="bar">text4</span> <span class="bar">text5</span>
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
-- Matthieu Ricaud IGS-CP Service Livre numirique
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Grouping "span" with same, David Carlisle | Thread | Re: [xsl] Grouping "span" with same, David Carlisle |
Re: [xsl] String cleaning in XSLT a, James Cummings | Date | Re: [xsl] Grouping "span" with same, David Carlisle |
Month |