Re: [xsl] Correcting misplaced spaces in XML documents

Subject: Re: [xsl] Correcting misplaced spaces in XML documents
From: "Peter Flynn peter@xxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 26 Mar 2023 09:38:59 -0000
On 26/03/2023 02:34, Trevor Nicholls trevor@xxxxxxxxxxxxxxxxxx wrote:
I suppose this falls into the category of data cleanup.

In the very simple case I am importing documents which have content
like this:

B B B <para>Press the<keyname> Escape </keyname>key.</para>

You'll notice that the adjacent spaces are wrapped in the keyname
element when they should just be adjacent to it, not in it.

This is a pathological case,

<aside> I believe this is commonly due to a bug in Word, where a double-click to select a word also used to include the following space, if any. AFAIK this has been fixed in current versions, but only relatively recently. What cause the inclusion of the leading space is more puzzling, but I would tend to suspect deficiencies in the original interface, whatever it was. </aside>

Peter

Current Thread