forked from nexusformat/definitions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnxdlTypes.xsd
191 lines (168 loc) · 11.2 KB
/
nxdlTypes.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
<?xml version="1.0" encoding="UTF-8"?>
<!--
########### SVN repository information ###################
# $LastChangedDate$
# $LastChangedBy$
# $LastChangedRevision$
# $HeadURL$
########### SVN repository information ###################
-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://definition.nexusformat.org/nxdl/@NXDL_RELEASE@"
xmlns:nxdl="http://definition.nexusformat.org/nxdl/@NXDL_RELEASE@"
version="$Id$"
elementFormDefault="qualified">
<xs:annotation>
<xs:documentation>
..
NeXus - Neutron and X-ray Common Data Format
Copyright (C) 2008-2012 NeXus International Advisory Committee (NIAC)
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 3 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
For further information, see http://www.nexusformat.org
</xs:documentation>
</xs:annotation>
<!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
<xs:simpleType name="anyUnitsAttr">
<xs:annotation>
<xs:documentation>
Unit categories in NXDL specifications
describe the expected type of units for a NeXus field.
They should describe valid units consistent with
the manual section on NeXus units (based on UDUNITS).
Units are not validated by NeXus.
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:enumeration value="NX_ANGLE"><xs:annotation><xs:documentation>example: degrees or radians or arcminutes or</xs:documentation></xs:annotation></xs:enumeration>
<xs:enumeration value="NX_ANY"><xs:annotation><xs:documentation>usage: things like logs that aren't picky on units</xs:documentation></xs:annotation></xs:enumeration>
<xs:enumeration value="NX_AREA"><xs:annotation><xs:documentation>example: m2 or barns</xs:documentation></xs:annotation></xs:enumeration>
<xs:enumeration value="NX_CROSS_SECTION"><xs:annotation><xs:documentation>example: barns</xs:documentation></xs:annotation></xs:enumeration>
<xs:enumeration value="NX_CHARGE"><xs:annotation><xs:documentation>example: pC or C</xs:documentation></xs:annotation></xs:enumeration>
<xs:enumeration value="NX_CURRENT"><xs:annotation><xs:documentation>example: A</xs:documentation></xs:annotation></xs:enumeration>
<xs:enumeration value="NX_DIMENSIONLESS"><xs:annotation><xs:documentation>for fields where the units cancel out, example: "" or mm/mm (NOTE: not the same as NX_UNITLESS)</xs:documentation></xs:annotation></xs:enumeration>
<xs:enumeration value="NX_EMITTANCE"><xs:annotation><xs:documentation>emittance (``length * angle``) of a radiation source, example: ``nm*rad``</xs:documentation></xs:annotation></xs:enumeration>
<xs:enumeration value="NX_ENERGY"><xs:annotation><xs:documentation>example: J or keV</xs:documentation></xs:annotation></xs:enumeration>
<xs:enumeration value="NX_FLUX"><xs:annotation><xs:documentation>example: s-1 cm-2</xs:documentation></xs:annotation></xs:enumeration>
<xs:enumeration value="NX_FREQUENCY"><xs:annotation><xs:documentation>example: Hz</xs:documentation></xs:annotation></xs:enumeration>
<xs:enumeration value="NX_LENGTH"><xs:annotation><xs:documentation>example: m</xs:documentation></xs:annotation></xs:enumeration>
<xs:enumeration value="NX_MASS"><xs:annotation><xs:documentation>example: g</xs:documentation></xs:annotation></xs:enumeration>
<xs:enumeration value="NX_MASS_DENSITY"><xs:annotation><xs:documentation>example: g cm-3</xs:documentation></xs:annotation></xs:enumeration>
<xs:enumeration value="NX_MOLECULAR_WEIGHT"><xs:annotation><xs:documentation>example: g mol-1</xs:documentation></xs:annotation></xs:enumeration>
<xs:enumeration value="NX_PER_AREA"><xs:annotation><xs:documentation>example: cm-2</xs:documentation></xs:annotation></xs:enumeration>
<xs:enumeration value="NX_PER_LENGTH"><xs:annotation><xs:documentation>example: cm-1</xs:documentation></xs:annotation></xs:enumeration>
<xs:enumeration value="NX_PERIOD"><xs:annotation><xs:documentation>(alias to NX_TIME) period of pulsed source, example: microseconds</xs:documentation></xs:annotation></xs:enumeration>
<xs:enumeration value="NX_POWER"><xs:annotation><xs:documentation>example: W</xs:documentation></xs:annotation></xs:enumeration>
<xs:enumeration value="NX_PRESSURE"><xs:annotation><xs:documentation>example: Pa</xs:documentation></xs:annotation></xs:enumeration>
<xs:enumeration value="NX_PULSES"><xs:annotation><xs:documentation>(alias to NX_NUMBER) clock pulses</xs:documentation></xs:annotation></xs:enumeration>
<xs:enumeration value="NX_SCATTERING_LENGTH_DENSITY"><xs:annotation><xs:documentation>example: cm-2</xs:documentation></xs:annotation></xs:enumeration>
<xs:enumeration value="NX_SOLID_ANGLE"><xs:annotation><xs:documentation>example: sr | steradian</xs:documentation></xs:annotation></xs:enumeration>
<xs:enumeration value="NX_TEMPERATURE"><xs:annotation><xs:documentation>example: K</xs:documentation></xs:annotation></xs:enumeration>
<xs:enumeration value="NX_TIME"><xs:annotation><xs:documentation>example: s</xs:documentation></xs:annotation></xs:enumeration>
<xs:enumeration value="NX_TIME_OF_FLIGHT"><xs:annotation><xs:documentation>(alias to NX_TIME) example: s</xs:documentation></xs:annotation></xs:enumeration>
<xs:enumeration value="NX_VOLTAGE"><xs:annotation><xs:documentation>example: V</xs:documentation></xs:annotation></xs:enumeration>
<xs:enumeration value="NX_VOLUME"><xs:annotation><xs:documentation>example: m3</xs:documentation></xs:annotation></xs:enumeration>
<xs:enumeration value="NX_UNITLESS"><xs:annotation><xs:documentation>for fields that don't have a unit (e.g. hkl) so that they don't inherit the wrong units (NOTE: not the same as NX_DIMENSIONLESS)</xs:documentation></xs:annotation></xs:enumeration>
<xs:enumeration value="NX_WAVELENGTH"><xs:annotation><xs:documentation>example: Angstrom</xs:documentation></xs:annotation></xs:enumeration>
<xs:enumeration value="NX_WAVENUMBER"><xs:annotation><xs:documentation>units for Q, example: Angstrom-1 or nm-1</xs:documentation></xs:annotation></xs:enumeration>
</xs:restriction>
</xs:simpleType>
<!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
<xs:simpleType name="primitiveType">
<xs:annotation>
<xs:documentation>
Valid names for the type attribute on fields and attributes.
This is an alias for NAPI (which is any valid NeXus type).
</xs:documentation>
</xs:annotation>
<xs:list itemType="nxdl:NAPI" />
</xs:simpleType>
<xs:simpleType name="NAPI">
<xs:annotation>
<xs:documentation>any valid NeXus type</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:enumeration value="NX_CHAR"><xs:annotation><xs:documentation>any string representation</xs:documentation></xs:annotation></xs:enumeration>
<xs:enumeration value="NX_FLOAT"><xs:annotation><xs:documentation>any representation of a floating point number</xs:documentation></xs:annotation></xs:enumeration>
<xs:enumeration value="NX_INT"><xs:annotation><xs:documentation>any representation of an integer number</xs:documentation></xs:annotation></xs:enumeration>
<xs:enumeration value="NX_UINT"><xs:annotation><xs:documentation>any representation of an unsigned integer number (includes zero)</xs:documentation></xs:annotation></xs:enumeration>
<xs:enumeration value="NX_POSINT"><xs:annotation><xs:documentation>any representation of a positive integer number (greater than zero)</xs:documentation></xs:annotation></xs:enumeration>
<xs:enumeration value="NX_NUMBER"><xs:annotation><xs:documentation>any valid NeXus number representation</xs:documentation></xs:annotation></xs:enumeration>
<xs:enumeration value="NX_DATE_TIME"><xs:annotation><xs:documentation>alias of ISO8601</xs:documentation></xs:annotation></xs:enumeration>
<xs:enumeration value="ISO8601"><xs:annotation><xs:documentation>ISO 8601 date and time representation (http://www.w3.org/TR/NOTE-datetime)</xs:documentation></xs:annotation></xs:enumeration>
<xs:enumeration value="NX_BOOLEAN"><xs:annotation><xs:documentation>true/false value ( true | 1 | false | 0 )</xs:documentation></xs:annotation></xs:enumeration>
<xs:enumeration value="NX_BINARY"><xs:annotation><xs:documentation>any representation of binary data - if text, line terminator is [CR][LF]</xs:documentation></xs:annotation></xs:enumeration>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="NX_CHAR">
<xs:annotation>
<xs:documentation>any string representation</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string" />
</xs:simpleType>
<xs:simpleType name="NX_FLOAT">
<xs:annotation>
<xs:documentation>any representation of a floating point number</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:float" />
</xs:simpleType>
<xs:simpleType name="NX_INT">
<xs:annotation>
<xs:documentation>any representation of an integer number</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:integer" />
</xs:simpleType>
<xs:simpleType name="NX_UINT">
<xs:annotation>
<xs:documentation>any representation of an unsigned integer number (includes zero)</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:unsignedInt" />
</xs:simpleType>
<xs:simpleType name="NX_POSINT">
<xs:annotation>
<xs:documentation>any representation of a positive integer number (greater than zero)</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:positiveInteger" />
</xs:simpleType>
<xs:simpleType name="NX_NUMBER">
<xs:annotation>
<xs:documentation>any valid NeXus number representation</xs:documentation>
</xs:annotation>
<xs:union memberTypes="nxdl:NX_INT nxdl:NX_UINT nxdl:NX_POSINT nxdl:NX_FLOAT"></xs:union>
</xs:simpleType>
<xs:simpleType name="NX_DATE_TIME">
<xs:annotation>
<xs:documentation>alias for the ISO8601 date/time stamp</xs:documentation>
</xs:annotation>
<xs:restriction base="nxdl:ISO8601" />
</xs:simpleType>
<xs:simpleType name="ISO8601">
<xs:annotation>
<xs:documentation>ISO8601 date/time stamp</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:dateTime" />
</xs:simpleType>
<xs:simpleType name="NX_BOOLEAN">
<xs:annotation>
<xs:documentation>true/false value ( true | 1 | false | 0 )</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:boolean" />
</xs:simpleType>
<xs:simpleType name="NX_BINARY">
<xs:annotation>
<xs:documentation>any representation of binary data - if text, line terminator is [CR][LF]</xs:documentation>
</xs:annotation>
<!-- TODO Is this the way to describe pure binary? uint8, byte, hex64binary -->
<!-- TODO Should be a uint8 but this does not seem to be allowed. Using xs:unsignedByte instead. -->
<xs:restriction base="xs:unsignedByte" />
</xs:simpleType>
</xs:schema>