summaryrefslogtreecommitdiffstats
path: root/sca-cpp/branches/cpp-M1/sca/xsd/sca-core.xsd
blob: 48fac92913be9f7589aae90fffcf83e694102262 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
<?xml version="1.0" encoding="UTF-8"?>
<!--
  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
 -->

<schema	xmlns="http://www.w3.org/2001/XMLSchema" 
		targetNamespace="http://www.osoa.org/xmlns/sca/0.9" 
		xmlns:sca="http://www.osoa.org/xmlns/sca/0.9"
		xmlns:sdo="commonj.sdo/XML"
		elementFormDefault="qualified">

  <element name="componentType" type="sca:ComponentType"/>
  <complexType name="ComponentType">
    <sequence>
      <element minOccurs="0" maxOccurs="unbounded" name="service" type="sca:Service"/>
      <element minOccurs="0" maxOccurs="unbounded" name="reference" type="sca:Reference"/>
      <element minOccurs="0" maxOccurs="unbounded" name="property" type="sca:Property"/>
      <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
    </sequence>
    <anyAttribute namespace="##any" processContents="lax"/>
  </complexType>

  <complexType name="Service">
    <sequence>
      <element minOccurs="1" maxOccurs="1" ref="sca:interface"/>
      <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
    </sequence>
    <attribute name="name" type="NCName" use="required"/>
    <anyAttribute namespace="##any" processContents="lax"/>
  </complexType>

  <element name="interface" type="sca:Interface"/>
  <complexType name="Interface"/>

  <complexType name="Reference">
    <sequence>
      <element minOccurs="1" maxOccurs="1" ref="sca:interface"/>
      <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>

  <complexType name="Property"> <!-- abstract="true"-->
    <sequence>
      <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
    </sequence>
    <attribute name="name" type="NCName" use="required"/>
    <attribute name="type" type="QName" use="required"/>
    <attribute name="many" type="boolean" default="false" use="optional"/>
    <attribute name="required" type="boolean" default="false" use="optional"/>
    <attribute name="default" type="string" use="optional"/>
    <anyAttribute namespace="##any" processContents="lax"/>
  </complexType>


  <element name="moduleFragment" type="sca:ModuleFragment"/>
  <complexType name="ModuleFragment">
    <sequence>
      <element minOccurs="0" maxOccurs="unbounded" name="entryPoint" type="sca:EntryPoint"/>
      <element minOccurs="0" maxOccurs="unbounded" name="component" type="sca:Component"/>
      <element minOccurs="0" maxOccurs="unbounded" name="externalService" type="sca:ExternalService"/>
      <element minOccurs="0" maxOccurs="unbounded" name="wire" type="sca:ModuleWire"/>
      <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
    </sequence>
    <attribute name="name" type="NCName" use="required"/>
    <anyAttribute namespace="##any" processContents="lax"/>
  </complexType>

  <element name="module" type="sca:Module"/>
  <complexType name="Module">
    <complexContent>
      <extension base="sca:ModuleFragment"/>
    </complexContent>
  </complexType>

  <complexType name="EntryPoint">
    <sequence>
      <element minOccurs="1" maxOccurs="1" ref="sca:interface"/>
      <element minOccurs="1" maxOccurs="unbounded" ref="sca:binding"/>
      <element minOccurs="1" maxOccurs="unbounded" name="reference" 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>
  <!-- a multiplicity 1..1 or 0..n sample
      <reference>StockQuoteComponent</reference>	- type must be URI
     a multiplicity 1..n or 0..n sample
      <reference>StockQuoteComponent1</reference>	- type must be URI
      <reference>StockQuoteComponent2</reference>
   -->

  <element name="binding" type="sca:Binding"/>
  <complexType name="Binding">
    <attribute name="uri" type="anyURI" use="optional"/>
  </complexType>
	

  <complexType name="Component">
    <sequence>
      <element minOccurs="1" maxOccurs="1" ref="sca:implementation"/>
      <element minOccurs="0" maxOccurs="1" name="properties" type="sca:PropertyValues"/>
      <element minOccurs="0" maxOccurs="1" name="references" type="sca:ReferenceValues"/>
      <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
    </sequence>
    <attribute name="name" type="NCName" use="required"/>
    <anyAttribute namespace="##any" processContents="lax"/>
  </complexType>
  <!-- a multiplicity 1..1 or 0..1 sample
      <references>
        <v:stockQuote>
StockQuoteComponent
</v:stockquote>				- type must be URI
      </references>
     a multiplicity 1..n or 0..n sample
      <references>
        <v:stockQuote>StockQuoteComponent1</v:stockQuote>	
- type must be URI
        <v:stockQuote>StockQuoteComponent2</v:stockQuote>
      </references>
   -->

  <element name="implementation" type="sca:Implementation"/>
  <complexType name="Implementation"/>

  <complexType name="PropertyValues">
    <sequence>
      <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
    </sequence>
    <anyAttribute namespace="##any" processContents="lax"/>
  </complexType>

  <complexType name="ReferenceValues">
    <sequence>
      <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
    </sequence>
    <anyAttribute namespace="##any" processContents="lax"/>
  </complexType>


  <complexType name="ExternalService">
    <sequence>
      <element minOccurs="1" maxOccurs="1" ref="sca:interface"/>
      <element minOccurs="0" maxOccurs="unbounded" ref="sca:binding"/>
      <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
    </sequence>
    <attribute name="name" type="NCName" use="required"/>
    <attribute name="overridable" type="sca:OverrideOptions" default="may" use="optional"/>
    <anyAttribute namespace="##any" processContents="lax"/>
  </complexType>

	

  <complexType name="ModuleWire">
    <sequence>
      <element minOccurs="1" maxOccurs="1" ref="sca:source.uri" sdo:name="sourceUri"/>
      <element minOccurs="1" maxOccurs="1" ref="sca:target.uri" sdo:name="targetUri"/>
      <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
    </sequence>
    <anyAttribute namespace="##any" processContents="lax"/>
  </complexType>

  <element name="source" type="anyType"/>
  <element name="target" type="anyType"/>
	

  <element name="source.uri" type="anyURI" substitutionGroup="sca:source" sdo:name="sourceUri"/>
  <element name="target.uri" type="anyURI" substitutionGroup="sca:target" sdo:name="targetUri"/>

  <element name="subsystem" type="sca:Subsystem"/>
  <complexType name="Subsystem">
    <sequence>
      <element minOccurs="0" maxOccurs="unbounded" name="entryPoint" type="sca:EntryPoint"/>
      <element minOccurs="0" maxOccurs="unbounded" name="moduleComponent" type="sca:ModuleComponent"/>
      <element minOccurs="0" maxOccurs="unbounded" name="externalService" type="sca:ExternalService"/>
      <element minOccurs="0" maxOccurs="unbounded" name="wire" type="sca:SystemWire"/>
      <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
    </sequence>
    <attribute name="name" type="NCName" use="required"/>
    <attribute name="uri" type="anyURI" use="optional"/>
    <anyAttribute namespace="##any" processContents="lax"/>
  </complexType>
	

  <complexType name="ModuleComponent">
    <sequence>
      <element minOccurs="0" maxOccurs="1" name="properties" type="sca:PropertyValues"/>
      <element minOccurs="0" maxOccurs="1" name="references" type="sca:ReferenceValues"/>
      <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
    </sequence>
    <attribute name="name" type="NCName" use="required"/>
    <attribute name="module" type="NCName" use="required"/>
    <attribute name="uri" type="anyURI" use="optional"/>
    <anyAttribute namespace="##any" processContents="lax"/>
  </complexType>

  <complexType name="SystemWire">
    <sequence>
      <element minOccurs="1" maxOccurs="1" ref="sca:source"/>
      <element minOccurs="1" maxOccurs="1" ref="sca:target"/>
      <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
    </sequence>
  </complexType>

  <element name="source.epr" type="anyType" substitutionGroup="sca:source"/>
  <element name="target.epr" type="anyType" substitutionGroup="sca:target"/>

  <simpleType name="Multiplicity">
    <restriction base="string">
      <enumeration value="0..1"/>
      <enumeration value="1..1"/>
      <enumeration value="0..n"/>
      <enumeration value="1..n"/>
    </restriction>
  </simpleType>

  <simpleType name="OverrideOptions">
    <restriction base="string">
      <enumeration value="no"/>
      <enumeration value="may"/>
      <enumeration value="must"/>
    </restriction>
  </simpleType>

</schema>