Mattias,

the usage of xsi:type is solely because object hierarchies are being
used in the AOM. Using xsi:type allows serializers to know the type
they are getting before having to parse it in.. however, even without
xsi:type, your serialization would still not be correct for the xsd
given (i.e. let us pretend there is only a C_ATTRIBUTE, with no
subclasses). Any reference to an element of type C_ATTRIBUTE
in xml should result in an xml entry named by the 'element with
type C_ATTRIBUTE' i.e. 'children'. You never put type names into
the actual xml instances, merely element names. And for sequences,
this means repeating the xml entry name 'children' (augmented in
this case by an xsi:type to help with the subclasses).

Andrew
_______________________________________________
openEHR-technical mailing list
openEHR-technical at openehr.org
http://www.chime.ucl.ac.uk/mailman/listinfo/openehr-technical



Reply via email to