Re: [xsl] Remove adjacent whitespace when removing element

Subject: Re: [xsl] Remove adjacent whitespace when removing element
From: Martin Honnen <Martin.Honnen@xxxxxx>
Date: Fri, 15 Nov 2013 11:01:11 +0100
Karl Stubsjoen wrote:

If I trap b <xsl:template match="b"/> and do nothing with it my result
looks like:

<data>
<a>this is a</a>

<c>this is c</c>
</data>

If you use


<xsl:template match="b | text()[preceding-sibling::node()[1][self::b] and not(normalize-space())]"/>

then the white space text node should be removed.

Current Thread