Definition of DV_ENCAPSULATED is incorrect (SIZE missing)


Abstract class DV_ENCAPSULATED has also an abstract SIZE property, but that is missing from .XSD and .BMM schemas (checked on 2014-09-20 on github).

DV_PARSABLE have that property effected (same way as DV_MULTIMEDIA), but it is not mentioned in its definition.

As for both classes (DV_MULTIMEDIA, DV_PARSABLE) this property is expressed as INTEGER, would be better if we just define it in the abstract class (DV_ENCAPSULATED) ?




Boštjan Lah
May 11, 2015, 5:36 PM

Although I agree with you - current way does make it more extensible. I.e. there might be a new kind of DV_ENCAPSULATED in the future without the size attribute.

Heath Frankel
May 12, 2015, 10:29 AM

The problem is that size is a function in DV_PARSABLE while it is an attribute in DV_MULTIMEDIA. DV_ENCPASULATED simply indicates it is abstract without indicating that it is an attribute or function. Not sure if this is possible in Eiffel but it certainly is not possible in c#. From XML schema perspective, it only makes sense to declare it in DV_MULTIMEDIA where it has been declared as an attribute and can be specified without any data to be able to derive it. DV_PARSABLE always has a value so it can always be derived.

I suggest the specification is updated to remove size from DV_ENCAPSULATED since the definition is different in the sub-classes.

Diego Bosca
May 12, 2015, 6:13 PM

+1 to Heath comment. Personally I'm not a big fan of being able to define constraints over function results at all (I think ideally they should be assertions), but probably it is a different issue.

Pablo Pazos
June 19, 2015, 3:52 AM

+1 on removing the abstract size from DV_ENCAPSULATED.

Thomas Beale
October 28, 2015, 1:24 AM

I guess we can take it out of DV_ENCAPSULATED. This is due to the fact that current OO mainstream languages aren't strong enough to represent these basic semantics! But we need to keep openEHR practical... we need 2 more on the acceptance list to create a CR.



Sebastian Iancu


Affects versions