Thank you all for such a quick response. I have added
xml:space="preserve" as suggested by Thomas and this seems to fix the
problem. However it is not a valid attribute within nonSort element in
Kevin here is the details of what we use to format the XML…
This is the class we use to format the XML:
and the code is as follows:
XMLOutputter tOut = new XMLOutputter(Format.getPrettyFormat());
I could not format the XML.
So it looks like there maybe two possible options here…
Option A – change xsd in order to allow for attribute xml:space="preserve"
within nonSort element. Also change MARC to MODS xslt to include this
attribute in nonSort element when needed.
Option B – not format xml. This wouldn’t be ideal for us as we format it
a few times.
Is option A possible?
Digital Standards Manager
National Library of Wales