summaryrefslogtreecommitdiff
path: root/src/XmlOcafResource/XmlOcaf.xsd
blob: 35e26b7c97b021288235737d530b72153853052c (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
<schema targetNamespace="http://www.opencascade.org/OCAF/XML"
        xmlns="http://www.w3.org/2001/XMLSchema"
        xmlns:ocaf="http://www.opencascade.org/OCAF/XML"
        elementFormDefault="qualified">
<include schemaLocation="XmlOcaf_SmallTypes.xsd"/>
<include schemaLocation="XmlOcaf_TDataStd.xsd"/>
<include schemaLocation="XmlOcaf_TDF.xsd"/>
<include schemaLocation="XmlOcaf_TDocStd.xsd"/>
<include schemaLocation="XmlOcaf_TFunction.xsd"/>
<include schemaLocation="XmlOcaf_TNaming.xsd"/>
<include schemaLocation="XmlOcaf_TPrsStd.xsd"/>

<annotation>
  <documentation xml:lang="en">
    Open Cascade Application Framework: Definition of XmlOcaf Persistence format.
    This Schema definition resides at: $(CASROOT)/src/XmlOcafResource/XmlOcaf.xsd
  </documentation>
</annotation>

<complexType name="LabelType">
  <sequence>
    <choice minOccurs="0" maxOccurs="unbounded">
      <element ref="ocaf:AbstractStringAtt"/>
      <element ref="ocaf:AbstractIntegerAtt"/>
      <element ref="ocaf:AbstractRealAtt"/>
      <element ref="ocaf:AbstractListIntegerAtt"/>
      <element ref="ocaf:AbstractListRealAtt"/>
      <element ref="ocaf:AbstractAttribute"/>
      <element ref="ocaf:AbstractXPathLabel"/>
      <element ref="ocaf:AbstractList3RealAtt"/>
    </choice>
    <element name="label" type="ocaf:LabelType" minOccurs="0" maxOccurs="unbounded">
<!-- This type of uniqueness does not alow recursive structures
      <unique name="LabelUniqueness">
        <selector xpath="ocaf:label"/>
        <field xpath="@tag"/>
      </unique> -->
    </element>
  </sequence>
  <attribute name="tag" type="positiveInteger" use="required"/>
</complexType>

<!-- Declaration of document element +++++++++++++++++++++++++++ -->
<element name="document">
  <complexType>
    <sequence>

<!-- Declaration of element 'info' +++++++++++++++++++++++++++++ -->
      <element name="info">
        <complexType>
          <sequence>
            <element name="iitem" type="string" minOccurs="0" maxOccurs="unbounded"/>
          </sequence>
          <attribute name="date" type="date" use="required"/>
          <attribute name="schemav" type="nonNegativeInteger" use="required"/>
          <attribute name="objnb" type="nonNegativeInteger" use="required"/>
        </complexType>
      </element>                                        <!-- END 'info' -->

<!-- Declaration of element 'comments' ++++++++++++++++++++++++++ -->
      <element name="comments">
        <complexType>
          <sequence>
            <element name="citem" type="string" minOccurs="0" maxOccurs="unbounded"/>
          </sequence>
        </complexType>
      </element>                                        <!-- END 'comments' -->

<!-- Declaration of element 'label' +++++++++++++++++++++++++++++ -->
      <element name="label">
      <!-- Local type redefinition from ocaf:LabelType by restriction -->
        <complexType>
          <complexContent>
            <restriction base="ocaf:LabelType">
	      <sequence>
                <choice minOccurs="0" maxOccurs="unbounded">
                  <element ref="ocaf:AbstractStringAtt"/>
                  <element ref="ocaf:AbstractIntegerAtt"/>
                  <element ref="ocaf:AbstractRealAtt"/>
                  <element ref="ocaf:AbstractListIntegerAtt"/>
                  <element ref="ocaf:AbstractListRealAtt"/>
                  <element ref="ocaf:AbstractAttribute"/>
		  <element ref="ocaf:AbstractXPathLabel"/>
                  <element ref="ocaf:AbstractList3RealAtt"/>
                </choice>
                <element name="label" type="ocaf:LabelType" minOccurs="0" maxOccurs="unbounded">
                  <unique name="Label1Uniqueness">
                    <selector xpath="ocaf:label"/>
                    <field xpath="@tag"/>         <!-- label tags -->
                  </unique>
                </element>
	      </sequence>
            <!-- Difference from ocaf:LabelType is FIXEDNESS of tag attribute -->
              <attribute name="tag" type="nonNegativeInteger" fixed="0"/>
            </restriction>
          </complexContent>
        </complexType>
<!-- Uniqueness of tags in sub-labels -->
        <unique name="Label0Uniqueness">
          <selector xpath="ocaf:label"/>
          <field xpath="@tag"/>
        </unique>
<!-- Uniqueness of 'id' values of shareable objects -->
        <unique name="ShareableIdUniqueness">
          <selector xpath=".//ocaf:*"/>
          <field xpath="@id"/>
        </unique>
      </element>                                        <!-- END 'label 0' -->

<!-- Declaration of element 'shapes' +++++++++++++++++++++++++++ -->
      <element name="shapes" type="string" minOccurs="0"/>

    </sequence>
    <attribute name="format" type="string" use="required"/>
  </complexType>
</element>                                              <!-- END 'document' -->
</schema>