Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
C++-SCA-Next
-
None
Description
Sca-core.xsd defines a single Service complex type, trying to support both <service> inside a <composite> and <service> inside a <componentType>.
The problem with this approach is that composite / service is pretty different from componentType / service. For example a composite service can contain bindings, references to other services, an a multiplicty attribute. Composite service looks to me more like a pattern of component than an actual service definition. ComponentType / service does not allow for this pattern at all.
The consequence is that the current XSD cannot be used to validate SCDL documents. To fix this I propose to have two different complex types to model these two different things:
- Service for ComponentType / service
- CompositeService for Composite / service.
<complexType name="Service">
<sequence>
<element ref="sca:interface" minOccurs="1" maxOccurs="1" />
<any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
</sequence>
<attribute name="name" type="NCName" use="required" />
<anyAttribute namespace="##any" processContents="lax" />
</complexType>
<complexType name="CompositeService">
<sequence>
<element ref="sca:interface" minOccurs="1" maxOccurs="1" />
<element ref="sca:binding" minOccurs="0" maxOccurs="unbounded" />
<element name="reference" minOccurs="0" maxOccurs="unbounded" type="anyURI" />
<any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
</sequence>
<attribute name="name" type="NCName" use="required" />
<attribute name="multiplicity" type="sca:Multiplicity" use="optional" default="1..1" />
<anyAttribute namespace="##any" processContents="lax" />
</complexType>
I also propose that we do the same thing for references.