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
MODS.
Kevin here is the details of what we use to format the XML…
This is the class we use to format the XML:
http://www.jdom.org/docs/apidocs.1.1/org/jdom/output/Format.html
and the code is as follows:
XMLOutputter tOut = new XMLOutputter(Format.getPrettyFormat());
pRes.setContentType("text/xml");
tOut.output(tDoc, pRes.getOutputStream());
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?
Many thanks,
Vicky
Digital Standards Manager
National Library of Wales
|