forked from blootsvoets/xmml
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathxmml.xsd
736 lines (688 loc) · 27.5 KB
/
xmml.xsd
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
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="external/xs3p-1/xs3p.xsl"?>
<schema
xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.mapper-project.eu/xmml"
xmlns:xmml="http://www.mapper-project.eu/xmml"
elementFormDefault="qualified">
<annotation><documentation>
Specification of the XML representation of the Multiscale Modeling Language
(xMML). For more information, visit http://www.mapper-project.eu/.
Every element may be appended with any attributes, and the extra and description
elements also take any element as their children.
</documentation></annotation>
<!-- Element definitions -->
<element name="model">
<annotation><documentation>
Root element of a multiscale model.
</documentation></annotation>
<complexType>
<sequence>
<element ref="xmml:description" minOccurs="0" maxOccurs="1"/>
<element ref="xmml:definitions"/>
<element ref="xmml:topology"/>
</sequence>
<attribute name="id" type="NCName" use="required"/>
<attribute name="name" type="string"/>
<attribute name="version" type="string"/>
<attribute name="xmml_version" fixed="0.4" type="xmml:version"/>
<anyAttribute processContents="lax"/>
</complexType>
<unique name="datatypeId">
<selector xpath="xmml:definitions/xmml:datatype"/>
<field xpath="@id"/>
</unique>
<unique name="mapperId">
<selector xpath="xmml:definitions/xmml:mapper"/>
<field xpath="@id"/>
</unique>
<unique name="terminalId">
<selector xpath="xmml:definitions/xmml:terminal"/>
<field xpath="@id"/>
</unique>
<unique name="submodelId">
<selector xpath="xmml:definitions/xmml:submodel"/>
<field xpath="@id"/>
</unique>
<unique name="filterId">
<selector xpath="xmml:definitions/xmml:filter"/>
<field xpath="@id"/>
</unique>
<unique name="instanceId">
<selector xpath="xmml:topology/xmml:instance"/>
<field xpath="@id"/>
</unique>
<keyref name="datatypeInIdRef" refer="xmml:datatypeId">
<selector xpath="xmml:definitions/xmml:filter"/>
<field xpath="@datatype_in"/>
</keyref>
<keyref name="datatypeOutIdRef" refer="xmml:datatypeId">
<selector xpath="xmml:definitions/xmml:filter"/>
<field xpath="@datatype_out"/>
</keyref>
<keyref name="datatypePortIdRef" refer="xmml:datatypeId">
<selector xpath="xmml:definitions/xmml:*/xmml:ports/xmml:*"/>
<field xpath="@datatype"/>
</keyref>
<keyref name="mapperIdRef" refer="xmml:mapperId">
<selector xpath="xmml:topology/xmml:instance"/>
<field xpath="@mapper"/>
</keyref>
<keyref name="terminalIdRef" refer="xmml:terminalId">
<selector xpath="xmml:topology/xmml:instance"/>
<field xpath="@terminal"/>
</keyref>
<keyref name="submodelIdRef" refer="xmml:submodelId">
<selector xpath="xmml:topology/xmml:instance"/>
<field xpath="@submodel"/>
</keyref>
<keyref name="filterIdRef" refer="xmml:filterId">
<selector xpath="xmml:topology/xmml:coupling/xmml:apply"/>
<field xpath="@filter"/>
</keyref>
</element>
<element name="description" type="xmml:anyContent">
<annotation><documentation>
A short textual description of the parent element.
</documentation></annotation>
</element>
<element name="definitions">
<annotation><documentation>
Type definitions within the model.
</documentation></annotation>
<complexType>
<sequence>
<element ref="xmml:datatype" minOccurs="0" maxOccurs="unbounded"/>
<choice minOccurs="0" maxOccurs="unbounded">
<element ref="xmml:terminal"/>
<element ref="xmml:filter"/>
<element ref="xmml:mapper"/>
<element ref="xmml:submodel"/>
</choice>
</sequence>
<anyAttribute processContents="lax"/>
</complexType>
</element>
<element name="datatype">
<annotation><documentation>
A datatype definition.
</documentation></annotation>
<complexType><complexContent>
<extension base="xmml:definition">
<attribute name="size_estimate" type="xmml:formula">
<annotation><documentation>
A function in terms of the scales and params of the
submodel it originated from.
</documentation></annotation></attribute>
<attribute name="extends" type="string">
<annotation><documentation>
Possibility to extend another datatype, such that
all information in the inherited datatype is also
available in the current datatype.
</documentation></annotation></attribute>
</extension>
</complexContent></complexType>
<keyref name="datatypeExtendsInIdRef" refer="xmml:datatypeId">
<selector xpath="xmml:datatype"/>
<field xpath="@extends"/>
</keyref>
</element>
<element name="filter">
<annotation><documentation>
A conduit filter, filtering a type of data and either converting it to
another type of data, or reducing the data over a dimension with a
certain factor, or interpolating in that dimension.
</documentation></annotation>
<complexType><complexContent>
<extension base="xmml:definition">
<sequence>
<element ref="xmml:description" minOccurs="0" maxOccurs="1"/>
<element ref="xmml:param" minOccurs="0" maxOccurs="unbounded"/>
<element ref="xmml:implementation" minOccurs="0" maxOccurs="1"/>
<element ref="xmml:extra" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
<attribute name="datatype_in" type="NCName"><annotation><documentation>
Data type that the filter accepts as input.
</documentation></annotation></attribute>
<attribute name="datatype_out" type="NCName"><annotation><documentation>
Data type that the filter will give as output.
</documentation></annotation></attribute>
<attribute name="type" use="required"><annotation><documentation>
Type of action that the filter will do. Interpolation produces more
output messages than input messages by some form of interpolation.
Reduction produces less messages than it receives. And finally, a
converter only alters the messages that it receives.
</documentation></annotation>
<simpleType>
<restriction base="NCName">
<enumeration value="interpolation"/>
<enumeration value="reduction"/>
<enumeration value="converter"/>
</restriction>
</simpleType>
</attribute>
<attribute name="dimension" type="string"><annotation><documentation>
The dimension over which the filter is applied. Use either the id
or the name of the dimension.
</documentation></annotation></attribute>
<attribute name="factor" type="xmml:formula"><annotation><documentation>
The filter may take a single argument, often a factor.
</documentation></annotation></attribute>
</extension>
</complexContent></complexType>
<unique name="filterParamId">
<selector xpath="xmml:param"/>
<field xpath="@id"/>
</unique>
</element>
<element name="terminal">
<annotation><documentation>
A terminal connection, either a source or a sink. This can pass predefined parameters
or file contents, or simply empty data structures. It is allowed to have a single port.
</documentation></annotation>
<complexType><complexContent>
<extension base="xmml:computationalElement">
<sequence>
<element ref="xmml:description" minOccurs="0" maxOccurs="1"/>
<element ref="xmml:param" minOccurs="0" maxOccurs="unbounded"/>
<element ref="xmml:ports"/>
<element ref="xmml:implementation" minOccurs="0" maxOccurs="1"/>
<element ref="xmml:extra" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
<attribute name="type" use="required">
<simpleType>
<restriction base="NCName">
<enumeration value="source"/>
<enumeration value="sink"/>
</restriction>
</simpleType>
</attribute>
</extension>
</complexContent></complexType>
<unique name="terminalParamId">
<selector xpath="xmml:param"/>
<field xpath="@id"/>
</unique>
</element>
<element name="mapper">
<annotation><documentation>
A fan-in, or fan-out, or fan-in-out mapper. If the type is fan-in, it may have multiple
in ports and one out port, otherwise, one in port and multiple out ports.
Implementation details may also be relevant. A fan-in mapper may have
the same in port used for a submodel instance with a multiplicity, and
conversely for the fan-out mapper. A filter with multiple inputs can be
constructed as a fan-in mapper. In and out ports may not have an operator
specified. A fan-in-out mapper may have multiple in- and out ports
but still has the limitation that it needs all inputs to have a message,
and then it sends one message to each output.
</documentation></annotation>
<complexType><complexContent>
<extension base="xmml:computationalElement">
<sequence>
<element ref="xmml:description" minOccurs="0" maxOccurs="1"/>
<element ref="xmml:param" minOccurs="0" maxOccurs="unbounded"/>
<element ref="xmml:ports"/>
<element ref="xmml:implementation" minOccurs="0" maxOccurs="1"/>
<element ref="xmml:extra" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
<attribute name="type" use="required">
<simpleType>
<restriction base="NCName">
<enumeration value="fan-in"/>
<enumeration value="fan-out"/>
<enumeration value="fan-in-out"/>
</restriction>
</simpleType>
</attribute>
</extension>
</complexContent></complexType>
<unique name="mapperParamId">
<selector xpath="xmml:param"/>
<field xpath="@id"/>
</unique>
</element>
<element name="submodel">
<annotation><documentation>
Definition of a single code of a single submodel. Attributes state whether
the submodel should be started at initialization if this is ambiguous,
whether it is stateful or not, or that it is optional but may bring some
optimization, and whether user interaction is required while running
the submodel.
</documentation></annotation>
<complexType><complexContent>
<extension base="xmml:computationalElement">
<sequence>
<element ref="xmml:description" minOccurs="0" maxOccurs="1"/>
<element ref="xmml:timescale"/>
<element ref="xmml:spacescale" minOccurs="0" maxOccurs="unbounded"/>
<element ref="xmml:otherscale" minOccurs="0" maxOccurs="unbounded"/>
<element ref="xmml:param" minOccurs="0" maxOccurs="unbounded"/>
<element ref="xmml:ports"/>
<element ref="xmml:implementation" minOccurs="0" maxOccurs="1"/>
<element ref="xmml:extra" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
<attribute name="name" type="string"><annotation><documentation>
A more descriptive name for the submodel, using any characters.
</documentation></annotation></attribute>
<attribute name="type" type="string"><annotation><documentation>
The generic type of submodel. Other submodels with the same type are
interchangeable with the current one but may use different algorithms to achieve the same goal.
</documentation></annotation></attribute>
<attribute name="stateful" type="xmml:OptionalChoice" default="no"><annotation><documentation>
Whether the submodel has a state that should be preserved after finalization
so that it can be used in initialization. Usually, this can be achieved
by keeping the submodel active, but a runtime system may dictate that
the submodel is responsible of storing and restoring its state between
instantiations.
</documentation></annotation></attribute>
</extension>
</complexContent></complexType>
<unique name="submodelParamId">
<selector xpath="xmml:param"/>
<field xpath="@id"/>
</unique>
<unique name="submodelScaleName">
<selector xpath="xmml:timescale | xmml:spacescale | t.otherscale"/>
<field xpath="@id"/>
</unique>
</element>
<element name="timescale" type="xmml:scale">
<annotation><documentation>
Temporal scale specification of a submodel. Using the attributes, it is a regular
scale, using child elements it is a full scale specification.
</documentation></annotation>
</element>
<element name="spacescale" type="xmml:multiDimensionalScale">
<annotation><documentation>
Spatial scale specification of a submodel. Using the attributes, it is a regular
scale, using child elements it is a full scale specification.
Either all spatial dimensions can be listed separately, or the number of
dimensions can be given as an attribute, using only one tag.
</documentation></annotation>
</element>
<element name="otherscale">
<annotation><documentation>
General scale specification of a submodel. Using the attributes, it is a regular
scale, using child elements it is a full scale specification.
Either all spatial dimensions can be listed separately, or the number of
dimensions can be given as an attribute, using only one tag.
</documentation></annotation>
<complexType><complexContent>
<extension base="xmml:multiDimensionalScale">
<attribute name="type" type="string"/>
</extension>
</complexContent></complexType>
</element>
<element name="param">
<annotation><documentation>
Useful for specifying the size of a datatype, or stating a fundamental
non-variable fact. It is not meant for completely parameterizing a
submodel, since this should be done at time of execution.
</documentation></annotation>
<complexType>
<sequence><element ref="xmml:description" minOccurs="0" maxOccurs="1"/></sequence>
<attribute name="id" type="NCName" use="required"/>
<attribute name="value" type="string" use="required"/>
<anyAttribute processContents="lax"/>
</complexType>
</element>
<element name="extra" type="xmml:anyContent">
<annotation><documentation>
Any information about an element not captured by any of the other tags.
If this is used, possibly the information therein can also be included
in the official format; if so, please contact me.
</documentation></annotation></element>
<element name="ports">
<annotation><documentation>
All in and out ports of a computational element.
If the parent element is a submodel, the ports should include an SEL operator.
</documentation></annotation>
<complexType>
<choice minOccurs="0" maxOccurs="unbounded">
<element name="in" type="xmml:port"/>
<element name="out" type="xmml:port"/>
</choice>
</complexType>
<unique name="portId">
<selector xpath="*"/>
<field xpath="@id"/>
</unique>
</element>
<element name="topology">
<annotation><documentation>
The instantiation of computational elements and the couplings between them.
</documentation></annotation>
<complexType>
<sequence>
<element ref="xmml:instance" minOccurs="0" maxOccurs="unbounded"/>
<element ref="xmml:coupling" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
<anyAttribute processContents="lax"/>
</complexType>
</element>
<element name="instance">
<annotation><documentation>
An instance of a submodel or mapper, by default using the same id as the
element it instantiates. A submodel instance may override some of the scale
information that was supplied in the submodel definition. Mappers may not
specify a multiplicity or be stateful.
</documentation></annotation>
<complexType>
<sequence>
<element ref="xmml:timescale" minOccurs="0" maxOccurs="1"/>
<element ref="xmml:spacescale" minOccurs="0" maxOccurs="unbounded"/>
<element ref="xmml:otherscale" minOccurs="0" maxOccurs="unbounded"/>
<element ref="xmml:param" minOccurs="0" maxOccurs="unbounded"/>
<element ref="xmml:extra" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
<attribute name="id" type="NCName"/>
<attribute name="submodel" type="NCName"/>
<attribute name="mapper" type="NCName"/>
<attribute name="terminal" type="NCName"/>
<attribute name="domain" type="xmml:domain"><annotation><documentation>
A domain name may be supplied, used to identify single domain interaction.
</documentation></annotation></attribute>
<attribute name="init" type="xmml:YesNoChoice"/>
<attribute name="interactive" type="xmml:OptionalChoice"/>
<attribute name="stateful" type="xmml:OptionalChoice"/>
<attribute name="multiplicity">
<annotation><documentation>
A multiplicity is a number that specifies how many instances should be
created. If this argument is used and not 1, it should be connected
using mappers. Alternatively, different instances can be addressed using
array notation, for instance: instanceA[0].</documentation></annotation>
<simpleType>
<restriction base="NCName">
<pattern value="[0-9]+|dynamic"/>
</restriction>
</simpleType>
</attribute>
<anyAttribute processContents="lax"/>
</complexType>
<unique name="instanceParamId">
<selector xpath="xmml:param"/>
<field xpath="@id"/>
</unique>
</element>
<element name="coupling">
<annotation><documentation>
A coupling from one submodel instance, mapper, or terminal to the other.
Notation: instance1.outport to instance2.inport. .
</documentation></annotation>
<complexType>
<sequence>
<element ref="xmml:apply" minOccurs="0" maxOccurs="unbounded"/>
<element ref="xmml:extra" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
<attribute name="name" type="string"/>
<attribute name="from" type="xmml:instancePort" use="required"/>
<attribute name="to" type="xmml:instancePort" use="required"/>
<attribute name="size" type="xmml:unit"><annotation><documentation>
Size can be specified if not already done in the datatypes.
</documentation></annotation></attribute>
<attribute name="interactive" type="xmml:OptionalChoice" default="no">
<annotation><documentation>
Whether the data that is sent through the conduit must be evaluated manually
before it can be passed to the next.</documentation></annotation></attribute>
<anyAttribute processContents="lax"/>
</complexType>
</element>
<element name="apply">
<annotation><documentation>
Specify filters that will be applied to the conduit. The order that they
are specified in is preserved.
</documentation></annotation>
<complexType>
<sequence>
<element ref="xmml:param" minOccurs="0" maxOccurs="unbounded"/>
<element ref="xmml:extra" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
<attribute name="filter" type="NCName" use="required"/>
<attribute name="factor" type="xmml:formula"><annotation><documentation>
Overrides the factor belonging to the filter.
</documentation></annotation></attribute>
<anyAttribute processContents="lax"/>
</complexType>
<unique name="applyParamId">
<selector xpath="xmml:param"/>
<field xpath="@id"/>
</unique>
</element>
<!-- Implementation details -->
<element name="implementation">
<annotation><documentation>
Implementation details of the submodel.
</documentation></annotation>
<complexType>
<sequence>
<element ref="xmml:interpreter" minOccurs="0" maxOccurs="unbounded"/>
<element ref="xmml:platform" minOccurs="0" maxOccurs="unbounded"/>
<element ref="xmml:library" minOccurs="0" maxOccurs="unbounded"/>
<element ref="xmml:code" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
<attribute name="size" type="xmml:unit"><annotation><documentation>
Size of the compiled code.
</documentation></annotation></attribute>
<attribute name="runtime" type="xmml:unit"><annotation><documentation>
Estimated typical runtime on the preferred platform.
</documentation></annotation></attribute>
<attribute name="memory" type="xmml:unit"><annotation><documentation>
Amount of memory that is needed for a simulation.</documentation></annotation></attribute>
<attribute name="cores" type="positiveInteger"><annotation><documentation>
Number of cores that are typically needed for a simulation.</documentation></annotation></attribute>
<attribute name="language" type="string"><annotation><documentation>
The programming language that is used.</documentation></annotation></attribute>
<attribute name="path" type="string"> <annotation><documentation>
The path to the code.</documentation></annotation></attribute>
<anyAttribute processContents="lax"/>
</complexType>
</element>
<element name="interpreter">
<complexType>
<attribute name="name" type="string"/>
<attribute name="path" type="string"/>
<attribute name="version" type="string"/>
<attribute name="flags" type="string"/>
<anyAttribute processContents="lax"/>
</complexType>
</element>
<element name="platform">
<complexType>
<attribute name="arch" type="string"/>
<attribute name="os" type="string" use="required"/>
<attribute name="preferred" type="xmml:YesNoChoice"/>
<anyAttribute processContents="lax"/>
</complexType>
</element>
<element name="library">
<complexType>
<attribute name="name" type="string" use="required"/>
<attribute name="path" type="string"/>
<anyAttribute processContents="lax"/>
</complexType>
</element>
<element name="code">
<annotation><documentation>
Store the code of an implementation in some specification language.
Inside, any XML or text may be used, although for special characters, use
the CDATA directive. The language is the input language for the actual
code, which should be of the language specified in the
</documentation></annotation>
<complexType>
<complexContent>
<extension base="xmml:anyContent">
<attribute name="language" type="string" use="required"/>
<attribute name="version" type="string"/>
<attribute name="part" type="string"/>
<attribute name="compiler" type="string"/>
<attribute name="compilerflags" type="string"/>
<anyAttribute processContents="lax"/>
</extension>
</complexContent>
</complexType>
</element>
<!-- Shared attributes -->
<complexType name="scale">
<sequence>
<element name="delta" type="xmml:range" minOccurs="0" maxOccurs="1"/>
<element name="total" type="xmml:range" minOccurs="0" maxOccurs="1"/>
</sequence>
<attribute name="id" type="NCName"/>
<attribute name="delta" type="xmml:unit"/>
<attribute name="total" type="xmml:unit"/>
<attribute name="characteristic" type="xmml:unit"/>
<anyAttribute processContents="lax"/>
</complexType>
<complexType name="multiDimensionalScale"><complexContent>
<extension base="xmml:scale">
<attribute name="dimensions" type="positiveInteger"/>
</extension></complexContent>
</complexType>
<complexType name="definition">
<annotation><documentation>
Represent an implemented entity.
</documentation></annotation>
<attribute name="id" type="NCName" use="required"/>
<attribute name="class" type="string"/>
<attribute name="version" type="string"/>
<anyAttribute processContents="lax"/>
</complexType>
<complexType name="computationalElement">
<annotation><documentation>
Represent a computational element.
</documentation></annotation>
<complexContent><extension base="xmml:definition">
<attribute name="init" type="xmml:YesNoChoice" default="no"/>
<attribute name="interactive" type="xmml:OptionalChoice" default="no"/>
</extension></complexContent>
</complexType>
<!-- Shared options -->
<simpleType name="YesNoChoice">
<annotation>
<documentation>A choice between yes and no.</documentation>
</annotation>
<restriction base="NCName">
<enumeration value="yes"/>
<enumeration value="no"/>
</restriction>
</simpleType>
<simpleType name="OptionalChoice">
<annotation>
<documentation>An `optional' option added to yes-no
choice.</documentation>
</annotation>
<restriction base="NCName">
<enumeration value="yes"/>
<enumeration value="no"/>
<enumeration value="optional"/>
</restriction>
</simpleType>
<simpleType name="SEL">
<annotation><documentation>
Operators in a submodel execution loop.
</documentation></annotation>
<restriction base="NCName">
<enumeration value="finit"/>
<enumeration value="Oi"/>
<enumeration value="S"/>
<enumeration value="B"/>
<enumeration value="Of"/>
</restriction>
</simpleType>
<!-- Enforce specific contents of xMML attributes -->
<simpleType name="unit">
<annotation>
<documentation>
An SI unit, written in scientific notation, but also accepting bits, bytes,
and human-readable time indication. Conformance is evaluated with pattern
`-?[0-9.]+([eE]-?[0-9]+)?\s*\w*'.
</documentation>
</annotation>
<restriction base="string">
<whiteSpace value="collapse"/>
<pattern value="-?[0-9.]+([eE]-?[0-9]+)?\s*\w*"/>
</restriction>
</simpleType>
<simpleType name="instancePort">
<annotation><documentation>
The port of an instance, indicated as `instance.port'.
</documentation></annotation>
<restriction base="string">
<pattern value="(\p{Pc}|\p{Pd}|\p{L}|\p{N})+\.(\p{Pc}|\p{Pd}|\p{L}|\p{N})+"/>
</restriction>
</simpleType>
<simpleType name="domain">
<annotation><documentation>
A domain and all its super-domains, separated by periods like
`domain.subdomain.subsubdomain'.
</documentation>
</annotation>
<restriction base="string">
<pattern value="(\p{Pc}|\p{Pd}|\p{L}|\p{N})+(\.(\p{Pc}|\p{Pd}|\p{L}|\p{N})+)*"/>
</restriction>
</simpleType>
<simpleType name="version">
<annotation><documentation>
Version number of xMML.
</documentation></annotation>
<restriction base="string">
<pattern value="\p{N}+(\.\p{N}+)*(\.\p{N}+-?(\p{L}|\p{N})+)?"/>
</restriction>
</simpleType>
<simpleType name="formula">
<annotation><documentation>
A formula with variables and some standard operators.
</documentation></annotation>
<restriction base="string"/>
</simpleType>
<!-- Shared attributes and elements -->
<complexType name="anyContent" mixed="true">
<annotation>
<documentation>Any content is possible within this type</documentation>
</annotation>
<sequence>
<any minOccurs="0" maxOccurs="unbounded" processContents="lax"/>
</sequence>
<anyAttribute processContents="lax"/>
</complexType>
<complexType name="port">
<annotation>
<documentation>
The id, submodel execution loop operator and datatype of a port. If it
concerns the port of a mapper, an operator should not be specified. The
optional type can be used to specify whether it concerns a port that only
transfers a state or a regular one.
</documentation>
</annotation>
<attribute name="id" type="NCName" use="required"/>
<attribute name="operator" type="xmml:SEL"/>
<attribute name="datatype" type="NCName"/>
<attribute name="type" default="normal">
<simpleType>
<restriction base="NCName">
<enumeration value="state"/>
<enumeration value="normal"/>
</restriction>
</simpleType>
</attribute>
<anyAttribute processContents="lax"/>
</complexType>
<complexType name="range">
<annotation><documentation>
A scale range, with an optional minimum and maximum value. If the type
is fixed, then during runtime this value will not vary and must be
specified for each submodel instance that uses it.
</documentation></annotation>
<attribute name="type" default="variable">
<simpleType>
<restriction base="NCName">
<enumeration value="variable"/>
<enumeration value="fixed"/>
</restriction>
</simpleType>
</attribute>
<attribute name="min" type="xmml:unit"/>
<attribute name="max" type="xmml:unit"/>
<anyAttribute processContents="lax"/>
</complexType>
</schema>