0031687: Draw Harness, ViewerTest - extend command vrenderparams with option updating...
[occt.git] / src / XmlOcafResource / XmlOcaf.xsd
1 <schema targetNamespace="http://www.opencascade.org/OCAF/XML"
2         xmlns="http://www.w3.org/2001/XMLSchema"
3         xmlns:ocaf="http://www.opencascade.org/OCAF/XML"
4         elementFormDefault="qualified">
5 <include schemaLocation="XmlOcaf_SmallTypes.xsd"/>
6 <include schemaLocation="XmlOcaf_TDataStd.xsd"/>
7 <include schemaLocation="XmlOcaf_TDF.xsd"/>
8 <include schemaLocation="XmlOcaf_TDocStd.xsd"/>
9 <include schemaLocation="XmlOcaf_TFunction.xsd"/>
10 <include schemaLocation="XmlOcaf_TNaming.xsd"/>
11 <include schemaLocation="XmlOcaf_TPrsStd.xsd"/>
12
13 <annotation>
14   <documentation xml:lang="en">
15     Copyright (c) 2001-2014 OPEN CASCADE SAS
16
17     This file is part of Open CASCADE Technology software library.
18
19     This library is free software; you can redistribute it and/or modify it under
20     the terms of the GNU Lesser General Public License version 2.1 as published
21     by the Free Software Foundation, with special exception defined in the file
22     OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
23     distribution for complete text of the license and disclaimer of any warranty.
24
25     Alternatively, this file may be used under the terms of Open CASCADE
26     commercial license or contractual agreement.
27
28     Open Cascade Application Framework: Definition of XmlOcaf Persistence format.
29     This Schema definition resides at: $(CASROOT)/src/XmlOcafResource/XmlOcaf.xsd
30   </documentation>
31 </annotation>
32
33 <complexType name="LabelType">
34   <sequence>
35     <choice minOccurs="0" maxOccurs="unbounded">
36       <element ref="ocaf:AbstractStringAtt"/>
37       <element ref="ocaf:AbstractIntegerAtt"/>
38       <element ref="ocaf:AbstractRealAtt"/>
39       <element ref="ocaf:AbstractListIntegerAtt"/>
40       <element ref="ocaf:AbstractListRealAtt"/>
41       <element ref="ocaf:AbstractAttribute"/>
42       <element ref="ocaf:AbstractXPathLabel"/>
43       <element ref="ocaf:AbstractList3RealAtt"/>
44     </choice>
45     <element name="label" type="ocaf:LabelType" minOccurs="0" maxOccurs="unbounded">
46 <!-- This type of uniqueness does not alow recursive structures
47       <unique name="LabelUniqueness">
48         <selector xpath="ocaf:label"/>
49         <field xpath="@tag"/>
50       </unique> -->
51     </element>
52   </sequence>
53   <attribute name="tag" type="positiveInteger" use="required"/>
54 </complexType>
55
56 <!-- Declaration of document element +++++++++++++++++++++++++++ -->
57 <element name="document">
58   <complexType>
59     <sequence>
60
61 <!-- Declaration of element 'info' +++++++++++++++++++++++++++++ -->
62       <element name="info">
63         <complexType>
64           <sequence>
65             <element name="iitem" type="string" minOccurs="0" maxOccurs="unbounded"/>
66           </sequence>
67           <attribute name="date" type="date" use="required"/>
68           <attribute name="schemav" type="nonNegativeInteger" use="required"/>
69           <attribute name="DocVersion" type="nonNegativeInteger" use="required"/>
70           <attribute name="objnb" type="nonNegativeInteger" use="required"/>
71         </complexType>
72       </element>                                        <!-- END 'info' -->
73
74 <!-- Declaration of element 'comments' ++++++++++++++++++++++++++ -->
75       <element name="comments">
76         <complexType>
77           <sequence>
78             <element name="citem" type="string" minOccurs="0" maxOccurs="unbounded"/>
79           </sequence>
80         </complexType>
81       </element>                                        <!-- END 'comments' -->
82
83 <!-- Declaration of element 'label' +++++++++++++++++++++++++++++ -->
84       <element name="label">
85       <!-- Local type redefinition from ocaf:LabelType by restriction -->
86         <complexType>
87           <complexContent>
88             <restriction base="ocaf:LabelType">
89               <sequence>
90                 <choice minOccurs="0" maxOccurs="unbounded">
91                   <element ref="ocaf:AbstractStringAtt"/>
92                   <element ref="ocaf:AbstractIntegerAtt"/>
93                   <element ref="ocaf:AbstractRealAtt"/>
94                   <element ref="ocaf:AbstractListIntegerAtt"/>
95                   <element ref="ocaf:AbstractListRealAtt"/>
96                   <element ref="ocaf:AbstractAttribute"/>
97                   <element ref="ocaf:AbstractXPathLabel"/>
98                   <element ref="ocaf:AbstractList3RealAtt"/>
99                 </choice>
100                 <element name="label" type="ocaf:LabelType" minOccurs="0" maxOccurs="unbounded">
101                   <unique name="Label1Uniqueness">
102                     <selector xpath="ocaf:label"/>
103                     <field xpath="@tag"/>         <!-- label tags -->
104                   </unique>
105                 </element>
106               </sequence>
107             <!-- Difference from ocaf:LabelType is FIXEDNESS of tag attribute -->
108               <attribute name="tag" type="nonNegativeInteger" fixed="0"/>
109             </restriction>
110           </complexContent>
111         </complexType>
112 <!-- Uniqueness of tags in sub-labels -->
113         <unique name="Label0Uniqueness">
114           <selector xpath="ocaf:label"/>
115           <field xpath="@tag"/>
116         </unique>
117 <!-- Uniqueness of 'id' values of shareable objects -->
118         <unique name="ShareableIdUniqueness">
119           <selector xpath=".//ocaf:*"/>
120           <field xpath="@id"/>
121         </unique>
122       </element>                                        <!-- END 'label 0' -->
123
124 <!-- Declaration of element 'shapes' +++++++++++++++++++++++++++ -->
125       <element name="shapes" type="string" minOccurs="0"/>
126
127     </sequence>
128     <attribute name="format" type="string" use="required"/>
129   </complexType>
130 </element>                                              <!-- END 'document' -->
131 </schema>