source: trunk/NeXus.xsd @ 1089

Revision 1060, 22.9 KB checked in by Pete Jemian, 3 months ago (diff)

fixes #216 (updated copyrights to 2012, renamed all to NIAC ownership

  • Property svn:eol-style set to native
  • Property svn:keywords set to Date Revision Author HeadURL Id
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
3        targetNamespace="http://definition.nexusformat.org/schema/@NXDL_RELEASE@" 
4        xmlns:nxsd="http://definition.nexusformat.org/schema/@NXDL_RELEASE@"
5        xmlns:nxdl="http://definition.nexusformat.org/nxdl/@NXDL_RELEASE@">
6<xs:annotation>
7<xs:documentation>
8# NeXus - Neutron and X-ray Common Data Format
9#
10# Copyright (C) 2008-2012 NeXus International Advisory Committee (NIAC)
11#
12# This library is free software; you can redistribute it and/or
13# modify it under the terms of the GNU Lesser General Public
14# License as published by the Free Software Foundation; either
15# version 3 of the License, or (at your option) any later version.
16#
17# This library is distributed in the hope that it will be useful,
18# but WITHOUT ANY WARRANTY; without even the implied warranty of
19# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
20# Lesser General Public License for more details.
21#
22# You should have received a copy of the GNU Lesser General Public
23# License along with this library; if not, write to the Free Software
24# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
25#
26# For further information, see http://www.nexusformat.org
27
28########### SVN repository information ###################
29# $LastChangedDate$
30# $LastChangedAuthor: Pete Jemian $
31# $LastChangedRevision$
32# $HeadURL$
33########### SVN repository information ###################
34                       
35
36  This file provides basic information for validating NeXus data files (but not NXDL), including:
37  * Basic data types (NX_FLOAT32, ISO8601 etc.) are all defined in NeXus.xsd along with enumerations
38    such as nxsd:validShape
39
40  * Base classes are each defined in a separate NXDL file (e.g. base_classes/NXentry.xxdl.xml)
41    These files are constructed using the rules of NXDL. 
42
43  * Instrument and application definitions are created in separate NXDL files
44
45  * Some object-orientated features have been added as they make definition writing easier and avoid duplication. For example:
46    - an abstract NXchopper.xsd has been created that is inherited by NXdisc_chopper.xsd and NXfermi_chopper.xsd
47    - all NeXus object inherit from nxsd:classBaseType (it just has a "name" attribute that all classes have)
48    - beamline components inherit from nxsd:componentType that contains "distance" and NXgeometry members etc.
49 
50</xs:documentation>
51</xs:annotation>
52
53        <!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
54       
55        <!--
56                Used for allowed names of elements and attributes
57                Need to be restricted to valid program variable names
58        -->
59        <xs:simpleType name="validName">
60                <xs:annotation> 
61                           <xs:documentation> 
62                                  Used for allowed names of elements and attributes. 
63                                  Need to be restricted to valid program variable names. 
64                                  Note:  This means no "-" or "." characters can be allowed and
65                                  you cannot start with a number.
66                                  HDF4 had a 64 character limit on names
67                                  (possibly including NULL) and NeXus enforces this
68                                  via the NX_MAXNAMELEN variable.
69                                </xs:documentation> 
70                </xs:annotation> 
71          <xs:restriction base="xs:token">
72                <xs:maxLength value="63" />   <!-- enforce via NX_MAXNAMELEN -->
73            <xs:pattern value="[A-Za-z_][A-Za-z0-9_]*" />
74          </xs:restriction>
75        </xs:simpleType>
76
77        <xs:simpleType name="validTarget">
78                <xs:annotation>
79                        <xs:documentation>
80                                This is a valid link target - currently it must be an absolute path
81                                made up of valid names with / character separating, but we may
82                                want to consider allowing ".." at some point.
83                                Must also consider use of name attribute in resolving link targets.
84                                /NXentry/NXinstrument/analyzer:NXcrystal/ef
85                                /NXentry/NXinstrument/monochromator:NXcrystal/ei
86                                /NX_other
87                        </xs:documentation> 
88                </xs:annotation> 
89                <xs:restriction base="xs:token">
90                        <xs:annotation>
91                                <xs:documentation>
92                                        The HDF5 documentation (http://www.hdfgroup.org/HDF5/doc/UG/UG_frame09Groups.html)
93                                        says "Note that relative path names in HDF5 do not employ the ../ notation,
94                                        the UNIX notation indicating a parent directory, to indicate a parent group."
95                                        Thus, if we only consider the case of
96                                        <code xmlns="http://docbook.org/ns/docbook">
97                                                class[:name]
98                                                (/[a-zA-Z_][\w_]*(:[a-zA-Z_][\w_]*)?)+
99                                        </code>
100                                        Note that HDF5 also permits relative path names, such as:
101                                        <code xmlns="http://docbook.org/ns/docbook">
102                                                GroupA/GroupB/Dataset1
103                                        </code>
104                                        but this is not permitted in the pattern below.
105                                </xs:documentation>
106                        </xs:annotation>
107                        <xs:pattern value="(/[a-zA-Z_][\w_]*(:[a-zA-Z_][\w_]*)?)+" />
108                </xs:restriction>
109        </xs:simpleType>
110
111        <xs:simpleType name="validNXClassName">
112                <xs:annotation> 
113                           <xs:documentation> 
114                                  Used for allowed names of NX class types (e.g. NXdetector)
115                                  not the instance (e.g. bank1) which is covered by validItemName. 
116                                </xs:documentation> 
117                </xs:annotation> 
118                <xs:restriction base="nxsd:validName">
119                                        <xs:pattern value="NX.+"/>
120                </xs:restriction>
121        </xs:simpleType>
122
123        <!-- NX_FLOAT32 -->
124        <xs:simpleType name="float32">
125          <xs:restriction base="xs:float" />
126        </xs:simpleType>
127        <xs:simpleType name="float32Attr">
128          <xs:restriction base="xs:string">
129            <xs:pattern value="NX_FLOAT32:.*" />
130          </xs:restriction>
131        </xs:simpleType>
132        <xs:simpleType name="float32Data">
133            <xs:list itemType="nxsd:float32" />
134        </xs:simpleType>
135         
136        <!-- NX_FLOAT64 -->
137        <xs:simpleType name="float64">
138          <xs:restriction base="xs:double" />
139        </xs:simpleType>
140        <xs:simpleType name="float64Attr">
141          <xs:restriction base="xs:string">
142            <xs:pattern value="NX_FLOAT64:.*" />
143          </xs:restriction>
144        </xs:simpleType>
145        <xs:simpleType name="float64Data">
146          <xs:list itemType="nxsd:float64" />
147        </xs:simpleType>
148
149        <!-- NX_FLOAT -->
150        <xs:simpleType name="float">
151          <xs:restriction base="xs:double" />
152        </xs:simpleType>
153        <xs:simpleType name="floatAttr">
154          <xs:restriction base="xs:string">
155            <xs:pattern value="NX_FLOAT(64|32):.*" />
156          </xs:restriction>
157        </xs:simpleType>
158        <xs:simpleType name="floatData">
159          <xs:list itemType="nxsd:float" />
160        </xs:simpleType>
161
162        <!-- NX_INT64 -->
163        <xs:simpleType name="int64">
164                <xs:restriction base="xs:long" />
165        </xs:simpleType>
166        <xs:simpleType name="int64attr">
167                <xs:restriction base="xs:string">
168                        <xs:pattern value="NX_INT64:[+\-]?\d+" />
169                </xs:restriction>
170        </xs:simpleType>
171        <xs:simpleType name="int64Data">
172                <xs:list itemType="nxsd:int64" />
173        </xs:simpleType>
174       
175        <!-- NX_INT32 -->
176        <xs:simpleType name="int32">
177          <xs:restriction base="xs:int" />
178        </xs:simpleType>
179        <xs:simpleType name="int32attr">
180          <xs:restriction base="xs:string">
181            <xs:pattern value="NX_INT32:[+\-]?\d+" />
182          </xs:restriction>
183        </xs:simpleType>
184        <xs:simpleType name="int32Data">
185          <xs:list itemType="nxsd:int32" />
186        </xs:simpleType>
187
188        <!-- NX_INT16 -->
189        <xs:simpleType name="int16">
190                <xs:restriction base="xs:int" />
191        </xs:simpleType>
192        <xs:simpleType name="int16attr">
193                <xs:restriction base="xs:string">
194                        <xs:pattern value="NX_INT16:[+\-]?\d+" />
195                </xs:restriction>
196        </xs:simpleType>
197        <xs:simpleType name="int16Data">
198                <xs:list itemType="nxsd:int16" />
199        </xs:simpleType>
200
201        <!-- NX_INT8 -->
202        <xs:simpleType name="int8">
203                <xs:restriction base="xs:int" />
204        </xs:simpleType>
205        <xs:simpleType name="int8attr">
206                <xs:restriction base="xs:string">
207                        <xs:pattern value="NX_INT8:[+\-]?\d+" />
208                </xs:restriction>
209        </xs:simpleType>
210        <xs:simpleType name="int8Data">
211                <xs:list itemType="nxsd:int8" />
212        </xs:simpleType>
213       
214        <!-- NX_INT -->
215        <xs:simpleType name="int">
216                <xs:restriction base="xs:long" />
217        </xs:simpleType>
218        <xs:simpleType name="intAttr">
219                <xs:restriction base="xs:string">
220                        <xs:pattern value="NX_INT(8|16|32|64):[+\-]?\d+" />
221                </xs:restriction>
222        </xs:simpleType>
223        <xs:simpleType name="intData">
224                <xs:list itemType="nxsd:int" />
225        </xs:simpleType>
226
227        <!-- NX_CHAR -->
228        <xs:simpleType name="char">
229          <xs:restriction base="xs:string" />
230        </xs:simpleType>
231        <xs:simpleType name="charAttr">
232          <xs:restriction base="xs:string" />
233        </xs:simpleType>
234        <xs:simpleType name="charData">
235          <xs:restriction base="xs:string" />
236        </xs:simpleType>
237       
238
239        <!-- NX_CHAR holding an ISO 8601 date string -->
240        <xs:simpleType name="ISO8601">
241          <xs:restriction base="xs:dateTime">
242            <!--
243                may want to allow T or space here;
244                also trailing .* needs to be updated for correct time zone structure
245            -->
246                <xs:pattern value="\d\d\d\d-\d\d-\d\d[T ]\d\d:\d\d:\d\d.*" />
247          </xs:restriction>
248        </xs:simpleType>
249        <xs:simpleType name="ISO8601Attr">
250                <xs:restriction base="xs:dateTime">
251                        <xs:pattern value="\d\d\d\d-\d\d-\d\dT\d\d:\d\d:\d\d" />
252                </xs:restriction>
253        </xs:simpleType>
254       
255        <!-- Valid strings describing data types that can be contained in a NAPItype attribute -->
256        <xs:simpleType name="NAPITypes">
257          <xs:restriction base="xs:string">
258                <!--xs:pattern value="NX_(CHAR|FLOAT32|FLOAT64|INT8|INT16|INT32|INT64)\[.*\]" /-->     
259                <xs:pattern value="NX_(CHAR|FLOAT32|FLOAT64|INT8|INT16|INT32|INT64).*" />       
260          </xs:restriction>
261        </xs:simpleType>
262
263        <!-- valid units for various things -->
264       
265        <xs:simpleType name="unit">
266                <xs:restriction base="nxsd:charAttr" />
267        </xs:simpleType>
268       
269        <xs:simpleType name="lengthUnit">
270                <xs:restriction base="nxsd:unit">
271                        <xs:enumeration value="metre" />           
272                </xs:restriction>
273        </xs:simpleType>
274       
275        <xs:simpleType name="wavelengthUnit">
276                <xs:restriction base="nxsd:unit">
277                        <xs:enumeration value="angstroms" />       
278                </xs:restriction>
279        </xs:simpleType>
280       
281        <xs:simpleType name="timeUnit">
282                <xs:restriction base="nxsd:unit">
283                        <xs:enumeration value="second" />
284                </xs:restriction>
285        </xs:simpleType>
286       
287        <xs:simpleType name="frequencyUnit">
288                <xs:restriction base="nxsd:unit">
289                        <xs:enumeration value="hertz" />
290                </xs:restriction>
291        </xs:simpleType>
292       
293        <xs:simpleType name="angleUnit">
294                <xs:restriction base="nxsd:unit">
295                        <xs:enumeration value="radian" />
296                        <xs:enumeration value="degree" />
297                </xs:restriction>
298        </xs:simpleType>
299       
300
301        <!-- Attributes of elements that are not classes i.e. that can contain floats, chars etc -->
302        <xs:attributeGroup name="standardDataAttributes">
303          <xs:attribute name="units" type="nxsd:unit" />
304        <!-- allow user defined attributes -->
305        <xs:anyAttribute namespace="##any" processContents="lax" />
306        </xs:attributeGroup>
307
308        <!-- An NX_FLOAT64 item -->
309        <xs:complexType name="float64DataType">
310                <xs:simpleContent>
311                        <xs:extension base="nxsd:float64Data">
312                                <xs:attributeGroup ref="nxsd:standardDataAttributes" /> 
313                                <!-- xs:attribute name="name" use="prohibited" / -->
314                                <xs:attribute name="NAPItype" use="required" >
315                                        <xs:simpleType>
316                                                <xs:restriction base="nxsd:NAPITypes">
317                                                        <!--xs:pattern value="NX_FLOAT64\[.*\]" /-->                                   
318                                                        <xs:pattern value="NX_FLOAT64.*" />                                     
319                                                </xs:restriction>
320                                        </xs:simpleType>       
321                                </xs:attribute>
322                        </xs:extension>
323                </xs:simpleContent>
324        </xs:complexType>
325
326        <!-- An NX_FLOAT32 item -->
327        <xs:complexType name="float32DataType">
328                <xs:annotation><xs:documentation>NX_FLOAT32</xs:documentation></xs:annotation>
329                <xs:simpleContent>
330                        <xs:extension base="nxsd:float32Data">
331                                <xs:attributeGroup ref="nxsd:standardDataAttributes" /> 
332                                <!-- xs:attribute name="name" use="prohibited" / -->
333                                <xs:attribute name="NAPItype" use="required" >
334                                <xs:simpleType>
335                                        <xs:restriction base="nxsd:NAPITypes">
336                                                <!--xs:pattern value="NX_FLOAT32\[.*\]" /-->                                   
337                                                <xs:pattern value="NX_FLOAT32.*" />                                     
338                                        </xs:restriction>
339                                </xs:simpleType>       
340                        </xs:attribute>
341                </xs:extension>
342                </xs:simpleContent>
343        </xs:complexType>
344
345        <!-- An NX_FLOAT item -->
346        <xs:complexType name="floatDataType">
347                <xs:annotation><xs:documentation>NX_FLOAT</xs:documentation></xs:annotation>
348                <xs:simpleContent>
349                        <xs:extension base="nxsd:floatData">
350                                <xs:attributeGroup ref="nxsd:standardDataAttributes" /> 
351                                <!-- xs:attribute name="name" use="prohibited" / -->
352                                <xs:attribute name="NAPItype" use="required" >
353                                <xs:simpleType>
354                                        <xs:restriction base="nxsd:NAPITypes">
355                                                <!--xs:pattern value="NX_FLOAT32\[.*\]" /-->                                   
356                                                <xs:pattern value="NX_FLOAT(32|64).*" />                                       
357                                        </xs:restriction>
358                                </xs:simpleType>       
359                        </xs:attribute>
360                </xs:extension>
361                </xs:simpleContent>
362        </xs:complexType>
363
364
365        <!-- An NX_INT64 item -->
366        <xs:complexType name="int64DataType">
367                <xs:simpleContent>
368                        <xs:extension base="nxsd:int64Data">
369                                <xs:attributeGroup ref="nxsd:standardDataAttributes" /> 
370                                <xs:attribute name="NAPItype" use="required" >
371                                        <xs:simpleType>
372                                                <xs:restriction base="nxsd:NAPITypes">
373                                                        <!--xs:pattern value="NX_INT64\[.*\]" /-->                                     
374                                                        <xs:pattern value="NX_INT64.*" />                                       
375                                                </xs:restriction>
376                                        </xs:simpleType>       
377                                </xs:attribute>
378                        </xs:extension>
379                </xs:simpleContent>
380        </xs:complexType>
381       
382       
383        <!-- An NX_INT32 item -->
384        <xs:complexType name="int32DataType">
385                <xs:simpleContent>
386                        <xs:extension base="nxsd:int32Data">
387                                <xs:attributeGroup ref="nxsd:standardDataAttributes" /> 
388                                <!-- xs:attribute name="name" use="prohibited" / -->
389                                <xs:attribute name="NAPItype" use="required" >
390                                        <xs:simpleType>
391                                                <xs:restriction base="nxsd:NAPITypes">
392                                                        <!--xs:pattern value="NX_INT32\[.*\]" /-->                                     
393                                                        <xs:pattern value="NX_INT32.*" />                                       
394                                                </xs:restriction>
395                                        </xs:simpleType>       
396                                </xs:attribute>
397                        </xs:extension>
398                </xs:simpleContent>
399        </xs:complexType>
400       
401        <!-- An NX_INT16 item -->
402        <xs:complexType name="int16DataType">
403                <xs:simpleContent>
404                        <xs:extension base="nxsd:int16Data">
405                                <xs:attributeGroup ref="nxsd:standardDataAttributes" /> 
406                                <!-- xs:attribute name="name" use="prohibited" / -->
407                                <xs:attribute name="NAPItype" use="required" >
408                                        <xs:simpleType>
409                                                <xs:restriction base="nxsd:NAPITypes">
410                                                        <!--xs:pattern value="NX_INT16\[.*\]" /-->                                     
411                                                        <xs:pattern value="NX_INT16.*" />                                       
412                                                </xs:restriction>
413                                        </xs:simpleType>       
414                                </xs:attribute>
415                        </xs:extension>
416                </xs:simpleContent>
417        </xs:complexType>
418       
419        <!-- An NX_INT8 item -->
420        <xs:complexType name="int8DataType">
421                <xs:simpleContent>
422                        <xs:extension base="nxsd:int8Data">
423                                <xs:attributeGroup ref="nxsd:standardDataAttributes" /> 
424                                <!-- xs:attribute name="name" use="prohibited" / -->
425                                <xs:attribute name="NAPItype" use="required" >
426                                        <xs:simpleType>
427                                                <xs:restriction base="nxsd:NAPITypes">
428                                                        <!--xs:pattern value="NX_INT8\[.*\]" /-->                                       
429                                                        <xs:pattern value="NX_INT8.*" />                                       
430                                                </xs:restriction>
431                                        </xs:simpleType>       
432                                </xs:attribute>
433                        </xs:extension>
434                </xs:simpleContent>
435        </xs:complexType>
436       
437        <!-- An NX_INT item -->
438        <xs:complexType name="intDataType">
439                <xs:simpleContent>
440                        <xs:extension base="nxsd:intData">
441                                <xs:attributeGroup ref="nxsd:standardDataAttributes" /> 
442                                <xs:attribute name="NAPItype" use="required" >
443                                        <xs:simpleType>
444                                                <xs:restriction base="nxsd:NAPITypes">
445                                                        <!--xs:pattern value="NX_INT64\[.*\]" /-->                                     
446                                                        <xs:pattern value="NX_INT(8|16|32|64).*" />                                     
447                                                </xs:restriction>
448                                        </xs:simpleType>       
449                                </xs:attribute>
450                        </xs:extension>
451                </xs:simpleContent>
452        </xs:complexType>
453
454        <!-- An NX_CHAR item -->
455        <xs:complexType name="charDataType">
456                <xs:simpleContent>
457                        <xs:extension base="nxsd:charData">
458                                <xs:attributeGroup ref="nxsd:standardDataAttributes" /> 
459                                <!-- xs:attribute name="name" use="prohibited" / -->
460                                <xs:attribute name="NAPItype" use="required" >
461                                        <xs:simpleType>
462                                                <xs:restriction base="nxsd:NAPITypes">
463                                                        <!--xs:pattern value="NX_CHAR\[.*\]" /-->                                       
464                                                        <xs:pattern value="NX_CHAR.*" />                                       
465                                                </xs:restriction>
466                                        </xs:simpleType>       
467                                </xs:attribute>
468                        </xs:extension>
469                </xs:simpleContent>
470        </xs:complexType>
471
472        <!-- An NX_CHAR item that holds an ISO8601 timestamp -->
473        <xs:complexType name="ISO8601DataType">
474                <xs:simpleContent>
475                        <xs:extension base="nxsd:charData">
476                                <xs:attributeGroup ref="nxsd:standardDataAttributes" /> 
477                                <!-- xs:attribute name="name" use="prohibited" / -->
478                                <xs:attribute name="NAPItype" use="required" >
479                                        <xs:simpleType>
480                                                <xs:restriction base="nxsd:NAPITypes">
481                                                        <!--xs:pattern value="NX_CHAR\[.*\]" /-->                                       
482                                                        <xs:pattern value="NX_CHAR.*" />                                       
483                                                </xs:restriction>
484                                        </xs:simpleType>       
485                                </xs:attribute>
486                        </xs:extension>
487                </xs:simpleContent>
488        </xs:complexType>
489
490        <!-- nxdl:NX_CHAR -->
491        <xs:complexType name="NX_ISO8601">
492                <xs:simpleContent>
493                        <xs:extension base="nxsd:ISO8601DataType" />
494                </xs:simpleContent>
495        </xs:complexType>
496       
497        <xs:complexType name="NX_DATE_TIME">
498                <xs:simpleContent>
499                        <xs:extension base="nxsd:ISO8601DataType" />
500                </xs:simpleContent>
501        </xs:complexType>
502
503        <xs:complexType name="NX_CHAR">
504                <xs:simpleContent>
505                        <xs:extension base="nxsd:charDataType" />
506                </xs:simpleContent>
507        </xs:complexType>
508
509        <xs:complexType name="NX_FLOAT">
510                <xs:simpleContent>
511                        <xs:extension base="nxsd:floatDataType" />
512                </xs:simpleContent>
513        </xs:complexType>
514
515        <xs:complexType name="NX_INT">
516                <xs:simpleContent>
517                        <xs:extension base="nxsd:intDataType" />
518                </xs:simpleContent>
519        </xs:complexType>
520
521        <xs:complexType name="NX_UINT">
522                <xs:simpleContent>
523                        <xs:extension base="nxsd:intDataType" />  <!-- need to do uint properly -->
524                </xs:simpleContent>
525        </xs:complexType>
526
527        <xs:complexType name="NX_POSINT">
528                <xs:simpleContent>
529                        <xs:extension base="nxsd:intDataType" />  <!-- need to do pos properly -->
530                </xs:simpleContent>
531        </xs:complexType>
532
533        <xs:complexType name="NX_NUMBER">
534                <xs:simpleContent>
535                        <xs:extension base="nxsd:floatDataType" />  <!-- need to do pos properly -->
536                </xs:simpleContent>
537        </xs:complexType>
538
539        <xs:complexType name="NX_BINARY">
540                <xs:simpleContent>
541                        <xs:extension base="nxsd:charDataType" />
542                </xs:simpleContent>
543        </xs:complexType>
544       
545        <xs:complexType name="NX_BOOLEAN">
546                <xs:simpleContent>
547                        <xs:extension base="nxsd:intDataType" />  <!-- need to do pos properly -->
548                </xs:simpleContent>
549        </xs:complexType>
550
551<!--
552        <xs:complexType name="floatLengthDataType">
553                <xs:simpleContent>
554                        <xs:restriction base="nxsd:floatDataType">
555                                <xs:attribute name="units" use="required" type="nxsd:lengthUnit" />
556                        </xs:restriction>
557                </xs:simpleContent>
558        </xs:complexType>
559               
560        <xs:complexType name="floatWavelengthDataType">
561                <xs:simpleContent>
562                        <xs:restriction base="nxsd:floatDataType">
563                                <xs:attribute name="units" use="required" type="nxsd:wavelengthUnit" />
564                        </xs:restriction>
565                </xs:simpleContent>
566        </xs:complexType>
567       
568       
569        <xs:complexType name="floatAngleDataType">
570                <xs:simpleContent>
571                        <xs:restriction base="nxsd:floatDataType">
572                                <xs:attribute name="units" use="required" type="nxsd:angleUnit" />
573                        </xs:restriction>
574                </xs:simpleContent>
575        </xs:complexType>
576       
577        <xs:complexType name="floatFrequencyDataType">
578                <xs:simpleContent>
579                        <xs:restriction base="nxsd:floatDataType">
580                                <xs:attribute name="units" use="required" type="nxsd:frequencyUnit" />
581                        </xs:restriction>
582                </xs:simpleContent>
583        </xs:complexType>
584-->     
585        <!-- link -->
586        <xs:complexType name="NAPIlinkType">
587                <xs:simpleContent>
588                        <xs:extension base="xs:string">
589                                <xs:attribute name="target" use="required" type="nxsd:validTarget" />   <!-- Could use key / keyref  to validate links -->
590                                <xs:attribute name="name" type="nxsd:validName"/>   <!-- Could use key / keyref  to validate links -->
591                        </xs:extension>
592                </xs:simpleContent>
593        </xs:complexType>
594
595        <xs:complexType name="classSuperBaseType">
596                <xs:sequence maxOccurs="unbounded" >
597                        <xs:element  type="nxsd:NAPIlinkType" name="NAPIlink" minOccurs="0" />
598                </xs:sequence>
599                <xs:attributeGroup ref="nxsd:standardClassAttributes" />
600                <!-- allow user defined attributes -->
601                <xs:anyAttribute namespace="##any" processContents="lax" />
602        </xs:complexType>
603       
604        <!-- attributes that may be on any NX* class -->
605        <xs:attributeGroup name="standardClassAttributes">
606                <xs:attribute name="name" type="nxsd:validName" use="optional" />
607        </xs:attributeGroup>
608       
609
610        <!-- base type for NX* classes -->
611        <xs:complexType name="classBaseType">
612                <xs:complexContent>
613                        <xs:restriction base="nxsd:classSuperBaseType">
614                                <xs:attribute name="NAPItype" use="prohibited" />
615                                <!-- allow user defined attributes -->
616                                <xs:anyAttribute namespace="##any" processContents="lax" />
617                        </xs:restriction>
618                </xs:complexContent>
619        </xs:complexType>
620
621
622        <!-- superceded by definitions in NXtranslation
623                <xs:complexType name="NXtranslationType">
624                <xs:complexContent>
625                        <xs:extension base="nxsd:classBaseType">
626                          <xs:sequence maxOccurs="unbounded">
627                                <xs:element type="nxsd:floatDataType" name="distances" minOccurs="0" />
628                                <xs:element type="nxsd:NXgeometryType" name="NXgeometry" minOccurs="0" />
629                          </xs:sequence>
630                        </xs:extension>
631                </xs:complexContent>
632        </xs:complexType>
633        -->
634       
635        <!-- superceded by definitions in NXorientation
636                <xs:complexType name="NXorientationType">
637                <xs:complexContent>
638                        <xs:extension base="nxsd:classBaseType">
639                          <xs:sequence maxOccurs="unbounded">
640                                <xs:element type="nxsd:floatDataType" name="angles" minOccurs="0" />
641                                <xs:element type="nxsd:NXgeometryType" name="NXgeometry" minOccurs="0" />
642                          </xs:sequence>
643                        </xs:extension>
644                </xs:complexContent>
645        </xs:complexType>
646        -->
647       
648       
649        <!-- superceded by definitions in NXshape
650                <xs:complexType name="NXshapeType">
651                <xs:complexContent>
652                        <xs:extension base="nxsd:classBaseType">
653                          <xs:sequence maxOccurs="unbounded">
654                                <xs:element type="nxsd:validShape" name="shape" minOccurs="0" />
655                                <xs:element type="nxsd:float32DataType" name="size" minOccurs="0" />
656                          </xs:sequence>
657                        </xs:extension>
658                </xs:complexContent>
659        </xs:complexType>
660        -->
661               
662        <!-- superceded by definitions in NXgeometry
663                <xs:complexType name="NXgeometryType">
664                <xs:complexContent>
665                        <xs:extension base="nxsd:classBaseType">
666                          <xs:sequence maxOccurs="unbounded">
667                                <xs:element type="nxsd:NXshapeType" name="NXshape" minOccurs="0" />
668                                <xs:element type="nxsd:NXtranslationType" name="NXtranslation" minOccurs="0" />
669                                <xs:element type="nxsd:NXorientationType" name="NXorientation" minOccurs="0" />
670                                <xs:element type="nxsd:charDataType" name="description" minOccurs="0" />
671                          </xs:sequence>
672                        </xs:extension>
673                </xs:complexContent>
674        </xs:complexType>
675        -->
676
677        <!-- an instrument component i.e. something that has a location, orientation etc. -->
678        <!-- superceded by definitions in NXcomponent
679                <xs:complexType name="componentType">
680                <xs:annotation><xs:documentation>An instrument component i.e. something that has a location, orientation etc.</xs:documentation></xs:annotation>
681                <xs:complexContent>
682                        <xs:extension base="nxsd:classBaseType">
683                          <xs:sequence maxOccurs="unbounded">
684                                <xs:element type="nxsd:floatDataType" name="distance" minOccurs="0">
685                                        <xs:annotation><xs:documentation>Flight path distance to object</xs:documentation></xs:annotation>
686                                       
687                                </xs:element>
688                                <xs:element type="nxsd:floatDataType" name="polar_angle" minOccurs="0">
689                                        <xs:annotation><xs:documentation>Polar angle of object.</xs:documentation></xs:annotation>
690                                       
691                                </xs:element>
692                                <xs:element type="nxsd:floatDataType" name="azimuthal_angle" minOccurs="0">
693                                        <xs:annotation><xs:documentation>Azimuthal angle of object.</xs:documentation></xs:annotation>
694                                       
695                                </xs:element>
696                                <xs:element type="nxsd:NXgeometryType" name="geometry" minOccurs="0">
697                                        <xs:annotation><xs:documentation>Geometry information of object</xs:documentation></xs:annotation>
698                                       
699                                </xs:element>
700                          </xs:sequence>
701                        </xs:extension>
702                </xs:complexContent>
703        </xs:complexType>
704        -->
705
706</xs:schema>
Note: See TracBrowser for help on using the repository browser.