On 09.03.2022 14:58, rick(_at_)rickquatro(_dot_)com wrote:
I just want this: "This has text.”
Then the string-join(text()) is fine.
*From:* Martin Honnen martin(_dot_)honnen(_at_)gmx(_dot_)de
<xsl-list-service(_at_)lists(_dot_)mulberrytech(_dot_)com>
*Sent:* Wednesday, March 9, 2022 8:53 AM
*To:* xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
*Subject:* Re: [xsl] Convert text nodes to a single string
On 09.03.2022 14:43, rick(_at_)rickquatro(_dot_)com wrote:
Thank you Martin and Wendell. I am incorporating this one:
normalize-space(string-join(text()))=''
In your example, with the input being <root>This has <b>some
</b>text.</root> and your template matching "root", do you want to
select only the text node children (i.e. "This has " and "text.") or
all text node descendants (i.e. "This has ", "some ", and "text.")?
XSL-List info and archive <http://www.mulberrytech.com/xsl/xsl-list>
EasyUnsubscribe <http://lists.mulberrytech.com/unsub/xsl-list/612310>
(by email)
XSL-List info and archive <http://www.mulberrytech.com/xsl/xsl-list>
EasyUnsubscribe <http://lists.mulberrytech.com/unsub/xsl-list/582271>
(by email <>)
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--