Print

Print


Vicky,

Leading or trailing white space in XML elements and attributes can often be trimmed in processing or in other contexts (e.g., pretty printing). You can try explicitly encoding the space by using the numeric character entity   (non-breaking space). You might also consider inserting the space when the data is processed/rendered rather than encoding it as data.

Hope this helps,

Terry


On Wed, Jul 9, 2014 at 10:09 AM, Vicky Phillips <[log in to unmask]> wrote:
Hi,
We seem to be losing the whitespace when formating xml e.g.

<nonSort>Yr </nonSort>
<title>Annibynwr</title>

becomes

<nonSort>Yr</nonSort>
<title>Annibynwr</title>

Any suggestions as to what we should do in order to retain this whitespace?
Many thanks,
Vicky
Digital Standards Manager
National Library of Wales