-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathomobj.xsd
More file actions
179 lines (138 loc) · 3.74 KB
/
omobj.xsd
File metadata and controls
179 lines (138 loc) · 3.74 KB
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
<?xml version="1.0"?>
<!-- OpenMath Schema
Version 0.1
Authors: Olga Caprotti and David Carlisle
Copyright 2001 2003 Openmath
$Id: omobj.xsd,v 1.4 2003/03/26 15:58:05 david Exp $
-->
<xs:schema
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns="http://www.openmath.org/OpenMath"
targetNamespace="http://www.openmath.org/OpenMath"
elementFormDefault="qualified">
<xs:element name="OMS">
<xs:complexType>
<xs:attribute name="name" type="omSymbname" use="required"/>
<xs:attribute name="cd" type="omCdname" use="required"/>
</xs:complexType>
</xs:element>
<xs:simpleType name="omSymbname">
<xs:restriction base="xs:string">
<xs:pattern value="[A-Za-z][A-Za-z0-9_]*" />
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="omCdname">
<xs:restriction base="xs:string">
<xs:pattern value="[a-z][a-z0-9_]*"/>
</xs:restriction>
</xs:simpleType>
<xs:element name="OMV" >
<xs:complexType>
<xs:attribute name="name" type="omVariable" use="required" />
</xs:complexType>
</xs:element>
<xs:simpleType name="omVariable">
<xs:restriction base="xs:string">
<xs:pattern value="([A-Za-z0-9\+=(),\-\./:\?!#$%\*;@\[\]\^_`\{\|\}])+"/>
</xs:restriction>
</xs:simpleType>
<xs:element name="OMI" type="omInteger" />
<!-- should derive from int not string, -->
<xs:simpleType name="omInteger" >
<xs:restriction base="xs:string">
<xs:pattern value="\s*(-\s?)?[0-9]+(\s[0-9]+)*\s*" />
</xs:restriction>
</xs:simpleType>
<xs:element name="OMF">
<xs:complexType>
<xs:attribute name="dec" type="omDecFloat" use="optional" />
<xs:attribute name="hex" type="omHexFloat" use="optional" />
</xs:complexType>
</xs:element>
<xs:simpleType name="omDecFloat" >
<xs:restriction base="xs:string">
<xs:pattern value="(-?)([0-9]+)?(\.[0-9]+)?(e([+\-]?)[0-9]+)?" />
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="omHexFloat">
<xs:restriction base="xs:string">
<xs:pattern value="[0-9A-F]+" />
</xs:restriction>
</xs:simpleType>
<xs:element name="OMB" type="xs:base64Binary" />
<xs:group name="omElement" >
<xs:choice>
<xs:element ref="OMS"/>
<xs:element ref="OMV"/>
<xs:element ref="OMI"/>
<xs:element ref="OMB"/>
<xs:element ref="OMSTR"/>
<xs:element ref="OMF"/>
<xs:element ref="OMA"/>
<xs:element ref="OMBIND"/>
<xs:element ref="OME"/>
<xs:element ref="OMATTR"/>
</xs:choice>
</xs:group>
<xs:element name="OMSTR" type="xs:string"/>
<xs:element name="OMA" >
<xs:complexType>
<xs:group ref="omElement" maxOccurs="unbounded"/>
</xs:complexType>
</xs:element>
<xs:element name="OMBIND">
<xs:complexType>
<xs:sequence>
<xs:group ref="omElement" />
<xs:element ref="OMBVAR" />
<xs:group ref="omElement"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="OMBVAR">
<xs:complexType>
<xs:choice maxOccurs="unbounded">
<xs:element ref="OMV"/>
<xs:element name="OMATTR" type="omAttrVar"/>
</xs:choice>
</xs:complexType>
</xs:element>
<xs:element name="OME">
<xs:complexType>
<xs:sequence>
<xs:element ref="OMS"/>
<xs:group ref="omElement" minOccurs="0" maxOccurs="unbounded" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="OMATTR">
<xs:complexType>
<xs:sequence>
<xs:element ref="OMATP"/>
<xs:group ref="omElement"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<!-- arrange that the OMATTR branch must eventually end in an OMV -->
<xs:complexType name="omAttrVar">
<xs:sequence>
<xs:element ref="OMATP"/>
<xs:choice>
<xs:element ref="OMV"/>
<xs:element name="OMATTR" type="omAttrVar"/>
</xs:choice>
</xs:sequence>
</xs:complexType>
<xs:element name="OMATP">
<xs:complexType>
<xs:sequence maxOccurs="unbounded">
<xs:element ref="OMS"/>
<xs:group ref="omElement"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="OMOBJ" type="OMOBJType"/>
<xs:complexType name="OMOBJType">
<xs:group ref="omElement" maxOccurs="unbounded"/>
</xs:complexType>
</xs:schema>