xsl-list
[Top] [All Lists]

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

2010-12-20 14:40:49
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


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--