Re: [xsl] Removing unwanted space

Subject: Re: [xsl] Removing unwanted space
From: "Joel Kalvesmaki director@xxxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 4 Jun 2021 08:49:27 -0000
Hi Charles,

This question seems to need more specificity. People can reasonably disagree on details, especially if a space appears to be an object of markup, or there are expectations further downstream about space explicitly tagged/formatted. For example, in the following variation...

<p>
<anchor> </anchor>
The rain in <bold> <underline> Spain </underline> </bold> <italic> is </italic> wet.
</p>


...what is the expected output?


OK, I've tried this a bunch of ways and failed (using XSLT 2.0).

The XML I'm working with has a bunch of unwanted whitespace in all
sorts of places, but looking just at paragraphs, it can have

<p>
	The rain in <bold>Spain</bold> <italic>is</italic> wet.
</p>

jk -- Joel Kalvesmaki Director, Text Alignment Network http://textalign.net

Current Thread