CKM is using the Java XML Serialiser to generate the XML presentation,
so it is no surprise you are seeing the same effect there.
I would see the Schemas as the source of truth.
If it is a sequence in the schema then I believe that the order cannot
simply be changed in the XML.
So, my opinion is that the XML Serialiser is probably wrong here
(although you may ask how much this order actually matters, practically
and theoretically)
Mattias Forss (who developed the XML Serialiser I believe), Eric
Sundvall or Rong Chen may be able to expand on it?
We are just about to produce a new XML schema for archetypes based on the new ADL 1.5 and getting rid of a lot of clutter for XML which was not required.
For example one change I have been promoting is the recording of existence. At present in the AOM it is an interval of 0..1 which can be constrained to 0..0 and 1..1. It is worth considering this carefully as an example of how we could simplify the expression in XML just as Thomas does in ADL.
First, the rule is that the reference model sets the minimum constraint. This must be either 0..1 (optional) or 1..1 (mandatory) ie attributes in the reference model can be optional or mandatory (no other choices). If the attribute is mandatory then there is no logical existence constraint that can be applied. So the constraint statements in the AOM that are possible for optional attributes are:
1) 0..0 (prohibited) and
2) 1..1 (required).
This is a binary constraint. For this reason we are proposing that existence is represented as an optional attribute with 2 values 'required' and 'prohibited'. This is easy to read and can be transformed into the in memory interval easily during de-serialisation. It also means that existence will usually not appear in an actual archetype as it is rarely used.
It would be good to have other ideas on simplification of the XML schema as we move to the new 2.1 AOM.
This is a binary constraint. For this reason we are proposing that existence
is represented as an optional attribute with 2 values
'required' and 'prohibited'.
Sam, an optional attribute with 2 values actually allows 3
states. Of course the default will map to one of the two
values - but this does allow 2 ways of expressing the
same concept.
My two preferences for this situation (representing
binary constraints)
a) mandatory attribute with 2 values
- or -
b) an optional attribute with ONE possible value, and where
the absence of the value is the default.
This is not quite correct as we are talking about constraint. The default is
what is in the RM. The three states are:
1. As in the RM - no statement
2. Required (optional in RM)
3. Prohibited (optional in RM)
I agreee with Sebastian, the real point is knowing how much this order
actually matters, practically and theoretically!
Currently, XML-schemas are the only formal specs of how the xml must be
done, so I think we need to be compliant with these!
@Sam Will new XML schema for archetypes be compatible with the current
version of schemas? I.e., an archetype expressed in xml, valid respect to
XML-schema 1.0.2, will it be valid also respect to new XML-schema?
Moreover,
XMLSerializer.output() produces xml fragments for DV_ORDINAL like this:
<children xsi:type="C_DV_ORDINAL">
<rm_type_name>DvOrdinal</rm_type_name> ...
while I'm expecting to have this
<children xsi:type="C_DV_ORDINAL">
<rm_type_name>DV_ORDINAL</rm_type_name> ....
Probably XMLSerializer is not so compliant with the standard..
This is not quite correct as we are talking about constraint. The default is
what is in the RM. The three states are:
1. As in the RM - no statement
2. Required (optional in RM)
3. Prohibited (optional in RM)
Is that sensible - Sam
Yes - that's fine. I was thinking you wanted to represent a
2-state system - but it really is a 3-state system as you
noted.