<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xsi:schemaLocation="http://www.w3.org/2001/XMLSchema XMLSchema.xsd"
            xmlns:Deployment="http://www.omg.org/Deployment"
            targetNamespace="http://www.omg.org/Deployment">

<xsd:include schemaLocation="ccd.xsd" />
  <xsd:complexType name="PlanSubcomponentPropertyReference">
    <xsd:sequence>
      <xsd:element name="propertyName" type="xsd:string"/>
      <xsd:element name="instance" type="Deployment:InstanceDeploymentDescription"/>
    </xsd:sequence>
  </xsd:complexType>

  <xsd:complexType name="PlanPropertyMapping">
    <xsd:sequence>
      <xsd:element name="name" type="xsd:string"/>
      <xsd:element name="source" type="xsd:string" minOccurs="0" maxOccurs="unbounded" />
      <xsd:element name="externalName" type="xsd:string"/>
      <xsd:element name="delegatesTo" type="Deployment:PlanSubcomponentPropertyReference" maxOccurs="unbounded" />
    </xsd:sequence>
  </xsd:complexType>

	<!-- Note:  name deploymentPlan should be DeploymentPlan, this is a hack to make XSC happy -->
  <xsd:complexType name="deploymentPlan">
   <xsd:sequence>
    <xsd:element name="label" type="xsd:string" minOccurs="0"/>
    <xsd:element name="UUID" type="xsd:string" minOccurs="0"/>      
    <xsd:element name="realizes" type="Deployment:ComponentInterfaceDescription" minOccurs="0" />     
    <xsd:element name="implementation" type="Deployment:MonolithicDeploymentDescription" minOccurs="0" maxOccurs="unbounded" />
    <xsd:element name="instance" type="Deployment:InstanceDeploymentDescription" minOccurs="0" maxOccurs="unbounded"/>
    <xsd:element name="connection" type="Deployment:PlanConnectionDescription" minOccurs="0" maxOccurs="unbounded"/>
    <!-- @@todo: needs to be added. -->
    <xsd:element name="externalProperty" type="Deployment:PlanPropertyMapping" minOccurs="0" maxOccurs="unbounded" />
    <xsd:element name="dependsOn" type="Deployment:ImplementationDependency" minOccurs="0" maxOccurs="unbounded"/>
    <xsd:element name="artifact" type="Deployment:ArtifactDeploymentDescription" minOccurs="0" maxOccurs="unbounded"/>
    <xsd:element name="infoProperty" type="Deployment:Property" minOccurs="0" maxOccurs="unbounded"/>
    <xsd:element name="localityConstraint" type="Deployment:PlanLocality" minOccurs="0" maxOccurs="unbounded"/>
  </xsd:sequence>
</xsd:complexType>


</xsd:schema>
