Lisa Thurston wrote: > Hi Adam and all > > I think there might have been some misunderstanding regarding the > problem you raised. Yes Oxygen and XmlSpy will add unpredictable > whitespace characters into an element when pretty printed and resaved. > The problem is that the XML tools don't know they are dealing with > elements whose space must be preserved. That can be fixed using > xml:space="preserve" attributes on all leaf elements which are values > (http://www.w3.org/TR/2000/REC-xml-20001006#sec-white-space). Then the > archetype XML can safely be pretty printed or collapsed back into ugly > print without affecting the content or meaning. > > There doesn't appear to be any 'best practice' on this particular > question. I don't think this naturally means we should be using XML > attributes to store the values. There is only a tiny 'efficiency' gain > by using attributes (approx. 6 characters less per value) which I > don't think offsets the value of having elements consistently used all > the way throughout the serialisation. > > What I think it does mean is that we should add xml:space="preserve" > attributes to our free-text leaf elements at the time of serialisation > so that the current problem is resolved. >
I reserve my views wrt attributes vs text() however that would do on the proviso of a bit of testing with many tools as it used to be patchily supported by different tools. I accept that was a few years back & things may well have improved. So then next question then is when will the tools support this? Adam ********************************************************************** This message may contain confidential and privileged information. If you are not the intended recipient please accept our apologies. Please do not disclose, copy or distribute information in this e-mail or take any action in reliance on its contents: to do so is strictly prohibited and may be unlawful. Please inform us that this message has gone astray before deleting it. Thank you for your co-operation. NHSmail is used daily by over 100,000 staff in the NHS. Over a million messages are sent every day by the system. To find out why more and more NHS personnel are switching to this NHS Connecting for Health system please visit www.connectingforhealth.nhs.uk/nhsmail **********************************************************************

