OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

sdo message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: [sdo] ISSUE 144: Clarification on relationship between a Type'scharacteristics and those of its Base type


In the section "8.4 - SDO Type and Property constraints" there are several constraints related to the relation between a type's characteristics and those of its base types:

.	Type.dataType and sequenced must have the same value as their base Types' dataType and sequenced.
.	Type.open may only be false when the base Types' open are also false.

There is also a similar relationship between a type's property and a property with the same name in one of the base types. These need to be cleaned up to ensure that:

1. The role of multiple inheritance is explored and clarified
2. The rules of mapping from XMLSchema to SDO (chapter 9) ensure that the constraints are automatically satisfied by the generated SDO metadata in all situations
3. Same rules in chapter 9 ensure that all valid XMLSchema documents can be processed.
  
Also relevant to this discussion is the statement in section 9.3.2: "If schema extension is used, the base type may need to be modified with sdox:sequence="true" and elements with name conflicts introduced in extensions require that the property in the extended base type must be made many=true." which seems to suggest that metadata already generated needs to be modified upon encountering derived Schema types in some situations. But this is not desireable because if the base type is already defined and potentially in use, it cannot be changed. On the other hand, having different results depending on whether the base type is defined at the same time as the derived type or not seems undesireable also. The statement has another implication that if Schema restriction is used, then the behavior is different. While I can't see how a type that is derived by restriction can be sequenced according to the rules for when a type is sequenced and its base type not be sequenced according to the same rules, the situation is possible wrt properties with name conflicts:

<sequence>
  <element name="a"/>                     
  <any>
</sequence>

restricted to

<sequence>
  <element name="a"/>
  <element name="a"/>
</sequence>

Based on the discussions in the group, the following observations emerged:
- It is not desireable to modify the base type upon processing one of its derived types, as mentioned above, at least not in all situations
- It is ok to say that dataType must be the same on the Type as on the Base, because Schema to SDO mapping rules are consistent with this. Also seems reasonable that in case of multiple inheritance all the base types must have the same value for dataType (even though inheritance for SDO data types is a concept that I don't understand fully, maybe it needs more explaining).
- It also seems ok to say that if a Base type is open, then the Type must also be open and further that if one of the Base types is open, the Type automatically is open (which the specification seems to express already). XSD to SDO mapping rules enforce this by saying that if the base type is open, then the derived type is also open, regardless of content model.
- Saying that sequenced must be the same on the Base type as on the derived Type is not ok, because the XSD to SDO mapping rules can create the case where the Base is not sequenced, but the Type is. But, while it seems clear that if the Base type is sequenced, then Type must also be, it's not clear that the case where Base is not sequenced and Type is is problematic. Maybe it should be the same as with open
- The problem of elements with the same name as in Base added via extension (or restriction as shown above) in Type seems serious and not unlikely for users to run into and it deserves more discussion. Not to mention the case of multiple inheritance of properties.



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]