xsl-list
[Top] [All Lists]

Re: [xsl] Remove adjacent whitespace when removing element

2013-11-15 06:47:05
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.





--~------------------------------------------------------------------
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>
--~--

<Prev in Thread] Current Thread [Next in Thread>