File: experiment.xsd

package info (click to toggle)
psychopy 2020.2.10%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 44,056 kB
  • sloc: python: 119,649; javascript: 3,022; makefile: 148; sh: 125; xml: 9
file content (179 lines) | stat: -rw-r--r-- 6,225 bytes parent folder | download
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
<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">

  <!-- names -->

  <xsd:simpleType name="Name">
     <xsd:restriction base="xsd:string">
       <xsd:pattern value="\S+"/>
     </xsd:restriction>
  </xsd:simpleType>

  <!-- parameter element -->

  <xsd:simpleType name="ValType">
     <xsd:restriction base="xsd:string">
       <xsd:enumeration value="bool"/>
       <xsd:enumeration value="code"/>
       <xsd:enumeration value="extendedCode"/>
       <xsd:enumeration value="num"/>
       <xsd:enumeration value="str"/>
       <xsd:enumeration value="extendedStr"/>
       <xsd:enumeration value="int"/>
       <xsd:enumeration value="list"/>
       <xsd:enumeration value="fixedList"/>
       <xsd:enumeration value="fileList"/>
     </xsd:restriction>
  </xsd:simpleType>

  <xsd:simpleType name="Updates">
     <xsd:restriction base="xsd:string">
       <xsd:enumeration value="constant"/>
       <xsd:enumeration value="None"/>
       <xsd:enumeration value="set every frame"/>
       <xsd:enumeration value="set every repeat"/>
     </xsd:restriction>
  </xsd:simpleType>

  <xsd:complexType name="Param">
    <!--
      important:
      Attributes "name" and "value" are not checked for valid characters.
    -->
    <xsd:attribute name="name" type="xsd:string" use="required"/>
    <xsd:attribute name="val" type="xsd:string" use="optional"/>
    <xsd:attribute name="valType" type="ValType" use="optional"/>
    <xsd:attribute name="updates" type="Updates" use="optional"/>
  </xsd:complexType>

  <!-- settings element -->

  <xsd:complexType name="Settings">
    <xsd:sequence>
      <xsd:element name="Param" type="Param" minOccurs="0" maxOccurs="unbounded"/>
    </xsd:sequence>
  </xsd:complexType>

  <!-- routines elements -->

  <xsd:complexType name="Component">
    <xsd:sequence>
      <xsd:element name="Param" type="Param" minOccurs="0" maxOccurs="unbounded"/>
    </xsd:sequence>
    <xsd:attribute name="name" type="Name" use="required"/>
  </xsd:complexType>

  <xsd:group name="ComponentGroup">
    <xsd:choice>
      <xsd:element name="ApertureComponent" type="Component"/>
      <xsd:element name="ButtonComponent" type="Component"/>
      <xsd:element name="cedrusButtonBoxComponent" type="Component"/>
      <xsd:element name="CodeComponent" type="Component"/>
      <xsd:element name="DotsComponent" type="Component"/>
      <xsd:element name="FormComponent" type="Component"/>
      <xsd:element name="GratingComponent" type="Component"/>
      <xsd:element name="ImageComponent" type="Component"/>
      <xsd:element name="ioLabsButtonBoxComponent" type="Component"/>
      <xsd:element name="KeyboardComponent" type="Component"/>
      <xsd:element name="MicrophoneComponent" type="Component"/>
      <xsd:element name="MouseComponent" type="Component"/>
      <xsd:element name="MovieComponent" type="Component"/>
      <xsd:element name="ParallelOutComponent" type="Component"/>
      <xsd:element name="QmixPumpComponent" type="Component"/>
      <xsd:element name="PolygonComponent" type="Component"/>
      <xsd:element name="RatingScaleComponent" type="Component"/>
      <xsd:element name="SoundComponent" type="Component"/>
      <xsd:element name="StaticComponent" type="Component"/>
      <xsd:element name="TextComponent" type="Component"/>
      <xsd:element name="TextboxComponent" type="Component"/>
      <xsd:element name="SliderComponent" type="Component"/>
      <xsd:element name="NoiseStimComponent" type="Component"/>
      <xsd:element name="EnvGratingComponent" type="Component"/>
    </xsd:choice>
  </xsd:group>

  <xsd:complexType name="Routine">
    <xsd:sequence>
      <xsd:group ref="ComponentGroup" minOccurs="0" maxOccurs="unbounded"/>
    </xsd:sequence>
    <xsd:attribute name="name" type="Name" use="required"/>
  </xsd:complexType>

  <xsd:complexType name="Routines">
    <xsd:sequence>
      <xsd:element name="Routine" type="Routine" minOccurs="0" maxOccurs="unbounded"/>
    </xsd:sequence>
  </xsd:complexType>

  <!-- flow elements -->

  <xsd:simpleType name="LoopType">
     <xsd:restriction base="xsd:string">
       <xsd:enumeration value="MultiStairHandler"/>
       <xsd:enumeration value="StairHandler"/>
       <xsd:enumeration value="TrialHandler"/>
     </xsd:restriction>
  </xsd:simpleType>

  <xsd:complexType name="FlowRoutine">
    <!--
      important:
      Attribute "name" is not checked for existence in Routines.
    -->
    <xsd:attribute name="name" type="Name" use="required"/>
  </xsd:complexType>

  <xsd:complexType name="LoopInitiator">
    <xsd:sequence>
      <xsd:element name="Param" type="Param" minOccurs="0" maxOccurs="unbounded"/>
    </xsd:sequence>
    <xsd:attribute name="loopType" type="LoopType" use="required"/>
    <xsd:attribute name="name" type="Name" use="required"/>
  </xsd:complexType>

  <xsd:complexType name="LoopTerminator">
    <xsd:attribute name="name" type="Name" use="required"/>
  </xsd:complexType>

  <xsd:group name="FlowGroup">
    <xsd:choice>
      <xsd:element name="Routine" type="FlowRoutine"/>
      <!--
        important:
        Initiator/Terminator pairs and matching names are not checked.
      -->
      <xsd:element name="LoopInitiator" type="LoopInitiator"/>
      <xsd:element name="LoopTerminator" type="LoopTerminator"/>
    </xsd:choice>
  </xsd:group>

  <xsd:complexType name="Flow">
    <xsd:sequence>
      <xsd:choice>
        <xsd:group ref="FlowGroup" minOccurs="0" maxOccurs="unbounded"/>
      </xsd:choice>
    </xsd:sequence>
  </xsd:complexType>

  <!-- experiment element -->

  <xsd:complexType name="Experiment">
    <xsd:all>
      <xsd:element name="Settings" type="Settings"/>
      <xsd:element name="Routines" type="Routines"/>
      <xsd:element name="Flow" type="Flow"/>
    </xsd:all>
    <xsd:attribute name="version" type="xsd:string"/>
    <xsd:attribute name="encoding" type="xsd:string"/>
  </xsd:complexType>

  <!-- root element -->

  <xsd:element name="PsychoPy2experiment" type="Experiment">
    <xsd:unique name="unique">
      <xsd:selector xpath="./Routines/Routine/*|./Flow/LoopInitiator|./Routines/Routine"/>
      <xsd:field xpath="@name"/>
    </xsd:unique>
  </xsd:element>

</xsd:schema>