No common pattern for XML xor and cardinality
Comparing e.g. Shape element:
Name | Type | Cardinality | AppliedStereotypes | Description |
---|---|---|---|---|
polyline | Polyline | 0..1 | xor, XSDelement | Polyline property of a shape. |
clothoid | Clothoid | 0..1 | xor, XSDelement | Clothoid property of a shape. |
nurbs | Nurbs | 0..1 | xor, XSDelement | NURBS property of a shape. |
and TrajectoryRef
Name | Type | Cardinality | AppliedStereotypes | Description |
---|---|---|---|---|
trajectory | Trajectory | 1..1 | xor, XSDelement | A trajectory definition. |
catalogReference | CatalogReference | 1..1 | xor, XSDelement | Reference to a trajectory in a catalog. |
they differ in terms of cardinality. And for no good reason, what I can see. They both should have one and only one of the sub elements. So the question is: Is one of the formats more correct?
And in that case should classes with the XML "Choice" element be aligned? On the other hand I guess that would be a problem w.r.t. backward compatibility.
At least it would be good to define preferred format for new classes to be added in 1.2 forward.