Adam,

> i) The present situation/structure is dangerous.

You need to get a better tool, Oxygen never splits an element value over
multiple lines or adds whitespace.  A tool that automatically does this is
dangerous.  I used to use XMLSpy and never experienced this, but after
hearing this I am glad I was convinced to move to Oxygen.

> ii) Pretty-print is the norm & even the ADL is pretty printed and has
adopted
> a similar method to cope.
Sure, but the tool should never add whitespace to a value, that is not the
norm, it is simply wrong.
 
> iii) The solution simplifies the XML in terms of both processing and human
> readability.
I do not see this at all, in fact your solution breaks much processing which
is derived directly from the Archetype Model.

Microsoft uses a lot of XML documents in its products and many of them use
elements to contain values.  In fact if you go to W3Cschools you will see
the majority of examples using element values, and this is a resource
teaching the basics of XML.
 
> iv) The solution shrinks the file sizes.
Turning an element value into an attribute with name value saves a very
minimal set of characters, I find it hard to see how you save a third.  In
some cases you might save a third (such as lower_included) but in others you
solution actually increase the size.  Take you example of lower and upper, a
start tag of 5 characters, add the angle brackets and you have 7 characters.
Using your solution, you have the attribute name of value, which is 5 plus 2
quotes, an equals sign and a space between the tag and the attribute,
totalling 9 characters.  


In the case of occurrences (or DV_INTERVALs in general), I think we should
treat the unbounded and included properties as attributes because they
provide meta data about how to interpret the real data, lower and upper.
You will never utilise the unbounded and included values in isolation, they
are always used in conjunction with the lower and upper.  So I would suggest
a change as follows:

        <occurrences>
            <lower included="true" >1</lower>
            <upper unbounded="true"/>
        </occurrences> 

The included and unbounded attributes exist for both lower and upper with
default values of false.  Due to the openEHR assertions, you will never need
more than 1 attribute on each element as included and unbounded cannot be
both true. 

The thing is, if we start entertaining these kinds of changes we will end up
in endless debates based on the religious beliefs of XML style.  Xml is just
another computer language, all computer professionals have different styles
when using those languages.  There is no right and wrong style, just
guidelines, but these are usually employed for consistency purposes
assisting the readability, not that one style is more ready than another.
Currently, the schema is as consistent as you will ever get.  

If anything is going to be changed, then the representation of INTERVAL is
probably the only candidate (there may be another one or two in similar
vein, meta data assisting in the interpretation of the value).

Regards

Heath


Reply via email to