> 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.
However, the problem is that it isn’t appropriate to always insert whitespace after a <nonSort> element. Consider
the following (made up) case:
So if there is non sortable whitespace it should be incorporated into the <nonSort> element.
This case looks like a bug, or bad assumptions, in the XML formatter. One shouldn’t
always trim whitespace.
> Hope this helps,
> On Wed, Jul 9, 2014 at 10:09 AM, Vicky Phillips <[log in to unmask]> wrote:
> We seem to be losing the whitespace when formating xml e.g.
> <nonSort>Yr </nonSort>
> Any suggestions as to what we should do in order to retain this whitespace?
> Many thanks,
> Digital Standards Manager
> National Library of Wales
Ashley Sanders [log in to unmask]
http://copac.ac.uk -- A Mimas service funded by JISC at the University of Manchester