forked from ulrikpedersen/ADScripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
hdf5_xml_layout_schema.xsd
executable file
·90 lines (82 loc) · 3.56 KB
/
hdf5_xml_layout_schema.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
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:simpleType name="dsetSourceEnum">
<xs:restriction base="xs:string">
<xs:enumeration value="detector" />
<xs:enumeration value="constant" />
<xs:enumeration value="ndattribute" />
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="attrSourceTypeEnum">
<xs:restriction base="xs:string">
<xs:enumeration value="int" />
<xs:enumeration value="float" />
<xs:enumeration value="string" />
</xs:restriction>
</xs:simpleType>
<xs:complexType name="attributeType">
<xs:attribute name="name" type="xs:string" use="required" />
<xs:attribute name="source" use="required">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="constant" />
<xs:enumeration value="ndattribute" />
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="when" use="optional">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="OnFileOpen" />
<xs:enumeration value="OnFileClose" />
<xs:enumeration value="OnFileWrite" />
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="value" type="xs:string" use="optional" default="" />
<xs:attribute name="type" type="attrSourceTypeEnum" use="optional" default="string" />
<xs:attribute name="ndattribute" type="xs:string" use="optional" default="" />
</xs:complexType>
<!-- The dataset element can contain attributes -->
<xs:complexType name="datasetType">
<xs:sequence>
<xs:element name="attribute" type="attributeType" maxOccurs="unbounded" minOccurs="0" />
</xs:sequence>
<xs:attribute name="name" type="xs:string" use="required" />
<xs:attribute name="source" type="dsetSourceEnum" use="required" />
<xs:attribute name="value" type="xs:string" use="optional" default="" />
<xs:attribute name="ndattribute" type="xs:string" use="optional" default="" />
<xs:attribute name="det_default" type="xs:boolean" use="optional" default="false" />
</xs:complexType>
<!-- The group element can contain other elements: datasets, attributes and other groups -->
<xs:complexType name="groupType">
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="dataset" type="datasetType" />
<xs:element name="attribute" type="attributeType" />
<xs:element name="group" type="groupType" />
</xs:choice>
<xs:attribute name="name" type="xs:string" use="required" />
<xs:attribute name="ndattr_default" type="xs:boolean" use="optional" default="false" />
</xs:complexType>
<!--The global element is so far only used to register an NDAttribute which will point
to the destination of the detector data -->
<xs:complexType name="globalType">
<xs:attribute name="name" use="required">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="detector_data_destination" />
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="ndattribute" type="xs:string" use="required" />
</xs:complexType>
<!-- The actual definition of the elements -->
<xs:element name="xml">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="global" type="globalType" />
<xs:element name="group" type="groupType" />
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>