A simple question. Is order relevant in dADL?, I mean, are these two extracts equivalent?
name = <
forenames = <"Sherlock">
salutation = <"Mr">
>
name = <
salutation = <"Mr">
forenames = <"Sherlock">
A simple question. Is order relevant in dADL?, I mean, are these two extracts equivalent?
name = <
forenames = <"Sherlock">
salutation = <"Mr">
>
name = <
salutation = <"Mr">
forenames = <"Sherlock">
jose alberto maldonado wrote:
A simple question. Is order relevant in dADL?, I mean, are these two extracts equivalent?
name = <
forenames = <"Sherlock">
salutation = <"Mr">
>name = <
salutation = <"Mr">
forenames = <"Sherlock">
>
Currently in dADL, order is preserved in lists. However, the above is not an example of a list instance, it is an instance of an object containing two attributes. So the two extracts are equivalent.
However, the following extract is a list:
name = <
parts("salutation") = <"Mr">
parts("forenames") = <"Sherlock">
>
There is currently no way to say in dADL that the order of the list is significant but it would be easy to add - it would suffice to add a meta-attribute called "ordered", in a similar way that the "cardinality" clause in cADL indicates cardinality and ordering; e.g.
name = <
#ordered = <True>
parts("salutation") = <"Mr">
parts("forenames") = <"Sherlock">
>
The exact syntax doesn't matter too much; the intention is that "ordered" is not required to be the actual name of an attribute of lists - instead it is an assumed attribute in the object meta-model. This means that the above could be parsed into list structures of various kinds, which each represent the fact of ordering of lists in their own way.
hope this helps,
- thomas beale