No XML Schema changes required, in fact the schema already indicates that
the string data should have space preserved as per the W3C references
provided by Adam.  The problem is that because the schema specifies
something is a string type it is not required to be specified in the XML
document and when a tool such as XMLSpy reads the document it doesn't know
what type the element is without referencing the schema, so it doesn't apply
the default space='preserve' attribute when it does a pretty-print.

So technically there is nothing wrong with the current XML.  However, to
support these tools that apply pretty print before checking the schema to
determine if they are allowed too, we could explicitly add this space
attribute in the data (alternately, we might be able to provide the type
attribute instead, but we haven't tested this yet).  The problem is forcing
the XML serialiser to put these explicit attributes in the data.  We will
explore this.

Stepping back a bit, would it be sufficient (in the short term at least) to
just have the XML pretty printed out of the tools rather than a single line
so that you are not inclined to use the problematic XMLSpy pretty print?

Heath

> -----Original Message-----
> From: openehr-technical-bounces at openehr.org [mailto:openehr-technical-
> bounces at openehr.org] On Behalf Of Thomas Beale
> Sent: Monday, 10 December 2007 7:34 AM
> To: adam.flinton at nhs.net; For openEHR technical discussions
> Subject: Re: Suggestion wrt XML Archetypes & Templates
> 
> Adam Flinton wrote:
> >
> >
> > 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?
> >
> looks like we have arrived at a useful point - first thing we need is an
> analysis of changes to the XML-schemas. If Lisa's change is all that is
> needed and someone wants to update the current schemas to make thi work,
> we can put it on the main TRUNK so that everyone can have access to it.
> 
> Further analysis will be needed for the tools, but I would not expect
> big problems. Generally they are using orthodox XML parsers whcih I
> assume respect the whitespace settings in an XML schema...
> 
> - thomas
> 
> 
> _______________________________________________
> openEHR-technical mailing list
> openEHR-technical at openehr.org
> http://lists.chime.ucl.ac.uk/mailman/listinfo/openehr-technical


Reply via email to