1. Summary
  2. Files
  3. Support
  4. Report Spam
  5. Create account
  6. Log in

root/NeuroML2/Schemas/NeuroML2/NeuroML_v2alpha.xsd

Revision 922, 44.6 KB (checked in by pgleeson, 3 months ago)

Updating comments/descriptions of ComponentTypes? in Synapses
Adding initial Computational Neuroscience Ontology references (e.g. synapse, stp, etc) for definign types. Not as new attribute (e.g. cnoTerm="cno_0009", etc) but at end of description. Will have to discuss how best to add refs to cno in LEMS at NeuroML 2012
Updated name of <plasticity> type. This is specific to short term plasticity, so renamed stpMechanism

Line 
1<?xml version="1.0" encoding="UTF-8"?>
2
3<xs:schema targetNamespace="http://www.neuroml.org/schema/neuroml2"
4    xmlns="http://www.neuroml.org/schema/neuroml2"
5    xmlns:xi="http://www.w3.org/2001/XInclude"
6    xmlns:xs="http://www.w3.org/2001/XMLSchema"
7    elementFormDefault="qualified"
8    attributeFormDefault="unqualified">
9
10
11    <!--+++++++++++++++++++++++++++++++++++++++++++++++++++++++-->
12    <!--      Core elements                                    -->
13    <!--+++++++++++++++++++++++++++++++++++++++++++++++++++++++-->
14
15    <xs:simpleType name="NmlId">
16        <xs:annotation>
17            <xs:documentation>An id attribute for elements which need to be identified uniquely (normally just within their parent element).</xs:documentation>
18        </xs:annotation>
19
20        <xs:restriction base="xs:string">
21            <xs:pattern value="[a-zA-Z0-9_]*"/>
22        </xs:restriction>
23
24    </xs:simpleType>
25
26    <xs:simpleType name="Nml2Quantity">
27        <xs:annotation>
28            <xs:documentation>A value for a physical quantity in NeuroML 2, e.g. 20, -60.0mV or 5nA</xs:documentation>
29        </xs:annotation>
30
31        <xs:restriction base="xs:string">
32            <xs:pattern value="-?([0-9]*(\.[0-9]+)?)([eE]-?[0-9]+)?[\s]*([_a-zA-Z0-9])*"/>
33        </xs:restriction>
34
35    </xs:simpleType>
36
37    <xs:simpleType name="Nml2Quantity_none">
38
39        <xs:restriction base="xs:string">
40            <xs:pattern value="-?([0-9]*(\.[0-9]+)?)([eE]-?[0-9]+)?"/> <!-- No units string -->
41        </xs:restriction>
42
43    </xs:simpleType>
44
45    <xs:simpleType name="Nml2Quantity_voltage">
46
47        <xs:restriction base="xs:string">
48            <xs:pattern value="-?([0-9]*(\.[0-9]+)?)([eE]-?[0-9]+)?[\s]*(V|mV)"/> <!-- Based on set of defined Units in NeuroMLCoreDimensions.xml -->
49        </xs:restriction>
50
51    </xs:simpleType>
52
53    <xs:simpleType name="Nml2Quantity_length">
54
55        <xs:restriction base="xs:string">
56            <xs:pattern value="-?([0-9]*(\.[0-9]+)?)([eE]-?[0-9]+)?[\s]*(m|cm|um)"/> <!-- Based on set of defined Units in NeuroMLCoreDimensions.xml -->
57        </xs:restriction>
58
59    </xs:simpleType>
60
61    <xs:simpleType name="Nml2Quantity_conductance">
62
63        <xs:restriction base="xs:string">
64            <xs:pattern value="-?([0-9]*(\.[0-9]+)?)([eE]-?[0-9]+)?[\s]*(S|mS|uS|nS|pS)"/> <!-- Based on set of defined Units in NeuroMLCoreDimensions.xml -->
65        </xs:restriction>
66
67    </xs:simpleType>
68
69    <xs:simpleType name="Nml2Quantity_conductanceDensity">
70
71        <xs:restriction base="xs:string">
72            <xs:pattern value="-?([0-9]*(\.[0-9]+)?)([eE]-?[0-9]+)?[\s]*(S_per_m2|mS_per_cm2)"/> <!-- Based on set of defined Units in NeuroMLCoreDimensions.xml -->
73        </xs:restriction>
74
75    </xs:simpleType>
76
77    <xs:simpleType name="Nml2Quantity_time">
78
79        <xs:restriction base="xs:string">
80            <xs:pattern value="-?([0-9]*(\.[0-9]+)?)([eE]-?[0-9]+)?[\s]*(s|ms)"/> <!-- Based on set of defined Units in NeuroMLCoreDimensions.xml -->
81        </xs:restriction>
82
83    </xs:simpleType>
84
85    <xs:simpleType name="Nml2Quantity_capacitance">
86
87        <xs:restriction base="xs:string">
88            <xs:pattern value="-?([0-9]*(\.[0-9]+)?)([eE]-?[0-9]+)?[\s]*(F|uF|nF|pF)"/> <!-- Based on set of defined Units in NeuroMLCoreDimensions.xml -->
89        </xs:restriction>
90
91    </xs:simpleType>
92
93    <xs:simpleType name="Nml2Quantity_specificCapacitance">
94
95        <xs:restriction base="xs:string">
96            <xs:pattern value="-?([0-9]*(\.[0-9]+)?)([eE]-?[0-9]+)?[\s]*(F_per_m2|uF_per_cm2)"/> <!-- Based on set of defined Units in NeuroMLCoreDimensions.xml -->
97        </xs:restriction>
98
99    </xs:simpleType>
100
101    <xs:simpleType name="Nml2Quantity_concentration">
102
103        <xs:restriction base="xs:string">
104            <xs:pattern value="-?([0-9]*(\.[0-9]+)?)([eE]-?[0-9]+)?[\s]*(mol_per_m3|mol_per_cm3|M|mM)"/> <!-- Based on set of defined Units in NeuroMLCoreDimensions.xml -->
105        </xs:restriction>
106
107    </xs:simpleType>
108
109    <xs:simpleType name="Nml2Quantity_current">
110
111        <xs:restriction base="xs:string">
112            <xs:pattern value="-?([0-9]*(\.[0-9]+)?)([eE]-?[0-9]+)?[\s]*(A|uA|nA|pA)"/> <!-- Based on set of defined Units in NeuroMLCoreDimensions.xml -->
113        </xs:restriction>
114
115    </xs:simpleType>
116
117    <xs:simpleType name="Nml2Quantity_temperature">
118
119        <xs:restriction base="xs:string">
120            <xs:pattern value="-?([0-9]*(\.[0-9]+)?)([eE]-?[0-9]+)?[\s]*(degC)"/> <!-- Based on set of defined Units in NeuroMLCoreDimensions.xml -->
121        </xs:restriction>
122
123    </xs:simpleType>
124
125
126    <xs:simpleType name="MetaId">
127        <xs:annotation>
128            <xs:documentation>An id string for pointing to an entry in an annotation element related to a MIRIAM resource. Based on metaid of SBML</xs:documentation>
129        </xs:annotation>
130
131        <xs:restriction base="xs:string">
132            <xs:pattern value="[a-zA-Z0-9_]*"/>
133        </xs:restriction>
134
135    </xs:simpleType>
136
137
138    <xs:simpleType name="NeuroLexId">
139        <xs:annotation>
140            <xs:documentation>An id string for pointing to an entry in the NeuroLex ontology. Use of this attribute is a shorthand for a full
141            RDF based reference to the MIRIAM Resource urn:miriam:neurolex, with an bqbiol:is qualifier</xs:documentation>
142        </xs:annotation>
143
144        <xs:restriction base="xs:string">
145            <xs:pattern value="[a-zA-Z0-9_]*"/>
146        </xs:restriction>
147
148    </xs:simpleType>
149
150
151    <xs:simpleType name="SegmentId">
152        <xs:annotation>
153            <xs:documentation>An id attribute for segments: integer >=0 only!</xs:documentation>
154        </xs:annotation>
155
156        <xs:restriction base="xs:nonNegativeInteger">
157        </xs:restriction>
158
159    </xs:simpleType>
160
161    <!--NOTE: Base and Standalone definitions moved to end of file, as some XML language binding
162        generators, e.g. generateDS.py, require superclasses to be defined after the subclasses... -->
163
164
165    <!--+++++++++++++++++++++++++++++++++++++++++++++++++++++++-->
166    <!--      Metadata elements                                -->
167    <!--+++++++++++++++++++++++++++++++++++++++++++++++++++++++-->
168
169    <xs:simpleType name="Notes">
170        <xs:annotation>
171            <xs:documentation>Textual human readable notes related to the element in question. It's useful to put these into
172         the NeuroML files instead of XML comments, as the notes can be extracted and repeated in the files to which the NeuroML is mapped.</xs:documentation>
173        </xs:annotation>
174        <xs:restriction base="xs:string"/>
175    </xs:simpleType>
176
177
178    <xs:complexType name="Annotation">
179        <xs:annotation>
180            <xs:documentation>Placeholder for MIRIAM related metadata, among others.</xs:documentation>
181        </xs:annotation>
182        <xs:sequence>
183            <xs:any processContents="skip" minOccurs="0" maxOccurs="unbounded"/> <!-- Further elements will be specified!! -->
184        </xs:sequence>
185    </xs:complexType>
186
187
188
189    <xs:simpleType name="ZeroToOne">
190        <xs:annotation>
191                <xs:documentation>Double restricted to between 1 and 0</xs:documentation>
192        </xs:annotation>
193        <xs:restriction base="xs:double">
194            <xs:minInclusive value="0"/>
195            <xs:maxInclusive value="1"/>
196        </xs:restriction>
197    </xs:simpleType>
198
199
200
201    <!--+++++++++++++++++++++++++++++++++++++++++++++++++++++++-->
202    <!--      Main NeuroML element                             -->
203    <!--+++++++++++++++++++++++++++++++++++++++++++++++++++++++-->
204
205    <xs:element name="neuroml" type="neuroml">
206        <xs:annotation>
207            <xs:documentation>The root NeuroML element.</xs:documentation>
208        </xs:annotation>
209    </xs:element>
210
211    <xs:complexType name="neuroml"> <!-- Making the complexType definition of the root element lowercase, not to confuse language binding generators... -->
212
213        <xs:complexContent>
214
215            <xs:extension base="Standalone">
216
217            <xs:sequence>
218               
219                <xs:element name="include" type="includeType" minOccurs="0" maxOccurs="unbounded"/>
220
221                <xs:element name="extracellularProperties" type="ExtracellularProperties" minOccurs="0" maxOccurs="unbounded"/>
222                <xs:element name="intracellularProperties" type="IntracellularProperties" minOccurs="0" maxOccurs="unbounded"/>
223
224                <xs:element name="morphology" type="Morphology" minOccurs="0" maxOccurs="unbounded"/>
225
226                <xs:element name="ionChannel" type="IonChannel" minOccurs="0" maxOccurs="unbounded"/>
227               
228                <xs:group ref="synapseTypes"/>
229
230                <xs:element name="biophysicalProperties" type="BiophysicalProperties" minOccurs="0" maxOccurs="unbounded"/>
231
232                <xs:group ref="cellTypes"/>
233
234                <xs:element name="pulseGenerator" type="PulseGenerator" minOccurs="0" maxOccurs="unbounded"/>
235
236                <xs:element name="network" type="Network" minOccurs="0" maxOccurs="unbounded"/>
237
238            </xs:sequence>
239
240            </xs:extension>
241
242        </xs:complexContent>
243
244    </xs:complexType>
245
246    <!-- A small subset of XLInclude from: http://www.w3.org/2001/XInclude.xsd 
247         Will be sufficient for now... -->
248    <xs:complexType name="includeType" mixed="true">
249        <xs:attribute name="href" use="optional" type="xs:anyURI"/>
250    </xs:complexType>
251
252    <xs:group name="cellTypes">
253        <xs:annotation>
254        <xs:documentation>Various types of cells which are defined in NeuroML 2. This list will be expanded...</xs:documentation>
255        </xs:annotation>
256        <xs:sequence>
257                <xs:element name="cell" type="Cell" minOccurs="0" maxOccurs="unbounded"/>
258                <xs:element name="abstractCell" type="AbstractCell" minOccurs="0" maxOccurs="unbounded"/>
259                <xs:element name="iafTauCell" type="IaFTauCell" minOccurs="0" maxOccurs="unbounded"/>
260                <xs:element name="iafCell" type="IaFCell" minOccurs="0" maxOccurs="unbounded"/>
261                <xs:element name="izhikevichCell" type="IzhikevichCell" minOccurs="0" maxOccurs="unbounded"/>
262                <xs:element name="adExIaFCell" type="AdExIaFCell" minOccurs="0" maxOccurs="unbounded"/>
263        </xs:sequence>
264   </xs:group>
265
266
267
268    <xs:group name="synapseTypes">
269        <xs:annotation>
270        <xs:documentation>Various types of synapse which are defined in NeuroML 2. This list will be expanded...</xs:documentation>
271        </xs:annotation>
272        <xs:sequence>
273                <xs:element name="expOneSynapse" type="ExpOneSynapse" minOccurs="0" maxOccurs="unbounded"/>
274                <xs:element name="expTwoSynapse" type="ExpTwoSynapse" minOccurs="0" maxOccurs="unbounded"/>
275                <xs:element name="nmdaSynapse"   type="NmdaSynapse"   minOccurs="0" maxOccurs="unbounded"/>
276                <xs:element name="stpSynapse"    type="StpSynapse"    minOccurs="0" maxOccurs="unbounded"/>
277        </xs:sequence>
278   </xs:group>
279
280    <!--+++++++++++++++++++++++++++++++++++++++++++++++++++++++-->
281    <!--      IonChannel element                                  -->
282    <!--+++++++++++++++++++++++++++++++++++++++++++++++++++++++-->
283
284    <xs:complexType name="IonChannel">
285
286        <xs:complexContent>
287            <xs:extension base="Standalone">
288                <xs:choice>
289                    <xs:element name="gate" type="Gate" minOccurs="0" maxOccurs="unbounded"/>
290                    <xs:element name="gateHH" type="Gate" minOccurs="0" maxOccurs="unbounded"/>
291                </xs:choice>
292
293                <xs:attribute name="species" type="NmlId" use="optional"/>
294
295                <xs:attribute name="type" type="channelTypes" use="optional"/>
296
297                <xs:attribute name="conductance" type="Nml2Quantity_conductance" use="optional"/>
298
299            </xs:extension>
300        </xs:complexContent>
301    </xs:complexType>
302
303    <xs:simpleType name="channelTypes">
304      <xs:restriction base="xs:string">
305        <xs:enumeration value="ionChannelPassive"/>
306        <xs:enumeration value="ionChannelHH"/>
307        <xs:enumeration value="ionChannelKS"/>
308      </xs:restriction>
309    </xs:simpleType>
310
311    <xs:simpleType name="gateTypes">
312      <xs:restriction base="xs:string">
313        <xs:enumeration value="gateHH"/>
314        <xs:enumeration value="gateHHQ10"/>
315        <xs:enumeration value="gateKS"/>
316      </xs:restriction>
317    </xs:simpleType>
318
319
320
321    <xs:complexType name="Gate">
322        <xs:complexContent>
323            <xs:extension base="Base">
324                <xs:sequence>
325                    <xs:any processContents="skip" minOccurs="0" maxOccurs="unbounded"/> <!-- Further elements will be specified!! -->
326                </xs:sequence>
327                <xs:attribute name="instances" type="xs:integer" use="optional" default="1"/>
328                <xs:attribute name="type" type="gateTypes" use="optional"/>
329            </xs:extension>
330        </xs:complexContent>
331    </xs:complexType>
332
333
334
335    <!--+++++++++++++++++++++++++++++++++++++++++++++++++++++++-->
336    <!--      Synapse types                                    -->
337    <!--+++++++++++++++++++++++++++++++++++++++++++++++++++++++-->
338
339    <xs:complexType name="ConductanceBasedSynapse">
340
341        <xs:complexContent>
342            <xs:extension base="Standalone">
343
344                <xs:attribute name="gbase" type="Nml2Quantity_conductance" use="required"/>
345                <xs:attribute name="erev" type="Nml2Quantity_voltage" use="required"/>
346
347            </xs:extension>
348        </xs:complexContent>
349    </xs:complexType>
350   
351   
352    <xs:complexType name="ExpOneSynapse">
353
354        <xs:complexContent>
355            <xs:extension base="ConductanceBasedSynapse">
356
357                <xs:attribute name="tauDecay" type="Nml2Quantity_time" use="required"/>
358
359            </xs:extension>
360        </xs:complexContent>
361    </xs:complexType>
362   
363   
364    <xs:complexType name="ExpTwoSynapse">
365
366        <xs:complexContent>
367            <xs:extension base="ConductanceBasedSynapse">
368
369                <xs:attribute name="tauDecay" type="Nml2Quantity_time" use="required"/>
370                <xs:attribute name="tauRise" type="Nml2Quantity_time" use="required"/>
371
372            </xs:extension>
373        </xs:complexContent>
374    </xs:complexType>
375   
376   
377    <xs:complexType name="NmdaSynapse">
378
379        <xs:complexContent>
380            <xs:extension base="ExpTwoSynapse">
381                <xs:sequence>
382                    <xs:element name="voltageConcDepBlock" type="VoltageConcDepBlock"/>
383                </xs:sequence>
384
385            </xs:extension>
386        </xs:complexContent>
387    </xs:complexType>
388   
389    <xs:complexType name="StpSynapse">
390
391        <xs:complexContent>
392            <xs:extension base="ExpTwoSynapse">
393                <xs:sequence>
394                    <xs:element name="stpMechanism" type="StpMechanism"/>
395                </xs:sequence>
396
397            </xs:extension>
398        </xs:complexContent>
399    </xs:complexType>
400   
401   
402
403    <xs:complexType name="VoltageConcDepBlock">
404        <xs:attribute name="type" type="xs:string" fixed="voltageConcDepBlock"/>
405        <xs:attribute name="species" type="NmlId" use="required"/>
406        <xs:attribute name="blockConcentration" type="Nml2Quantity_concentration" use="required"/>
407        <xs:attribute name="scalingConc" type="Nml2Quantity_concentration" use="required"/>
408        <xs:attribute name="scalingVolt" type="Nml2Quantity_voltage" use="required"/>
409    </xs:complexType>
410   
411    <xs:complexType name="StpMechanism">
412        <xs:attribute name="initReleaseProb" type="ZeroToOne" use="required"/>
413        <xs:attribute name="tauFac" type="Nml2Quantity_time" use="required"/>
414        <xs:attribute name="tauRec" type="Nml2Quantity_time" use="required"/>
415    </xs:complexType>
416
417
418
419    <!--+++++++++++++++++++++++++++++++++++++++++++++++++++++++-->
420    <!--      Cell element                                     -->
421    <!--+++++++++++++++++++++++++++++++++++++++++++++++++++++++-->
422
423    <xs:complexType name="AbstractCell">
424
425        <xs:complexContent>
426            <xs:extension base="Standalone">
427
428            </xs:extension>
429        </xs:complexContent>
430    </xs:complexType>
431
432    <xs:complexType name="IaFTauCell">
433        <xs:complexContent>
434            <xs:extension base="AbstractCell">
435                <xs:attribute name="leakReversal" type="Nml2Quantity_voltage" use="required"/>
436                <xs:attribute name="thresh" type="Nml2Quantity_voltage" use="required"/>
437                <xs:attribute name="reset" type="Nml2Quantity_voltage" use="required"/>
438                <xs:attribute name="tau" type="Nml2Quantity_time" use="required"/>
439            </xs:extension>
440        </xs:complexContent>
441    </xs:complexType>
442
443    <xs:complexType name="IaFCell">
444        <xs:complexContent>
445            <xs:extension base="AbstractCell">
446                <xs:attribute name="leakReversal" type="Nml2Quantity_voltage" use="required"/>
447                <xs:attribute name="thresh" type="Nml2Quantity_voltage" use="required"/>
448                <xs:attribute name="reset" type="Nml2Quantity_voltage" use="required"/>
449                <xs:attribute name="C" type="Nml2Quantity_capacitance" use="required"/>
450                <xs:attribute name="leakConductance" type="Nml2Quantity_conductance" use="required"/>
451            </xs:extension>
452        </xs:complexContent>
453    </xs:complexType>
454
455    <xs:complexType name="IzhikevichCell">
456        <xs:complexContent>
457            <xs:extension base="AbstractCell">
458                <xs:attribute name="v0" type="Nml2Quantity_voltage" use="required"/>
459                <xs:attribute name="thresh" type="Nml2Quantity_voltage" use="required"/>
460                <xs:attribute name="a" type="Nml2Quantity_none" use="required"/>
461                <xs:attribute name="b" type="Nml2Quantity_none" use="required"/>
462                <xs:attribute name="c" type="Nml2Quantity_none" use="required"/>
463                <xs:attribute name="d" type="Nml2Quantity_none" use="required"/>
464                <xs:attribute name="Iamp" type="Nml2Quantity_none" use="required"/>
465                <xs:attribute name="Idel" type="Nml2Quantity_time" use="required"/>
466                <xs:attribute name="Idur" type="Nml2Quantity_time" use="required"/>
467            </xs:extension>
468        </xs:complexContent>
469    </xs:complexType>
470
471    <xs:complexType name="AdExIaFCell">
472        <xs:complexContent>
473            <xs:extension base="AbstractCell">
474                <xs:attribute name="C" type="Nml2Quantity_capacitance" use="required"/>
475                <xs:attribute name="gL" type="Nml2Quantity_conductance" use="required"/>
476                <xs:attribute name="EL" type="Nml2Quantity_voltage" use="required"/>
477                <xs:attribute name="reset" type="Nml2Quantity_voltage" use="required"/>
478                <xs:attribute name="VT" type="Nml2Quantity_voltage" use="required"/>
479                <xs:attribute name="thresh" type="Nml2Quantity_voltage" use="required"/>
480                <xs:attribute name="delT" type="Nml2Quantity_voltage" use="required"/>
481                <xs:attribute name="tauw" type="Nml2Quantity_time" use="required"/>
482                <xs:attribute name="a" type="Nml2Quantity_conductance" use="required"/>
483                <xs:attribute name="b" type="Nml2Quantity_current" use="required"/>
484                <xs:attribute name="Iamp" type="Nml2Quantity_current" use="required"/>
485                <xs:attribute name="Idel" type="Nml2Quantity_time" use="required"/>
486                <xs:attribute name="Idur" type="Nml2Quantity_time" use="required"/>
487            </xs:extension>
488        </xs:complexContent>
489    </xs:complexType>
490
491
492    <xs:complexType name="Cell">
493
494        <xs:complexContent>
495            <xs:extension base="AbstractCell">
496
497                <xs:sequence>
498                    <xs:element name="morphology" type="Morphology" minOccurs="0"/>
499                    <xs:element name="biophysicalProperties" type="BiophysicalProperties" minOccurs="0"/>
500                </xs:sequence>
501
502
503                <xs:attribute name="morphology" type="NmlId" use="optional" default="1">
504                    <xs:annotation>
505                        <xs:documentation>Should only be used if morphology element is outside the cell.
506                                          This points to the id of the morphology</xs:documentation>
507                    </xs:annotation>
508                </xs:attribute>
509
510                <xs:attribute name="biophysicalProperties" type="NmlId" use="optional" default="1">
511                    <xs:annotation>
512                        <xs:documentation>Should only be used if biophysicalProperties element is outside the cell.
513                                          This points to the id of the biophysicalProperties</xs:documentation>
514                    </xs:annotation>
515                </xs:attribute>
516
517
518            </xs:extension>
519        </xs:complexContent>
520    </xs:complexType>
521
522
523    <xs:complexType name="Morphology">
524        <xs:annotation>
525            <xs:documentation>Standalone element which is usually inside a single cell, but could be outside and
526                              referenced by id.</xs:documentation>
527        </xs:annotation>
528
529        <xs:complexContent>
530
531            <xs:extension base="Standalone">
532
533                <xs:sequence>
534                    <xs:element name="segment" type="Segment" maxOccurs="unbounded"/>
535                    <xs:element name="segmentGroup" type="SegmentGroup" minOccurs="0" maxOccurs="unbounded"/>
536                </xs:sequence>
537
538            </xs:extension>
539        </xs:complexContent>
540    </xs:complexType>
541
542    <xs:complexType name="Segment">
543        <xs:complexContent>
544            <xs:extension base="Base">
545
546                <xs:sequence>
547                    <xs:element name="parent" type="SegmentParent" minOccurs="0"/>
548                    <xs:element name="proximal" type="Point3DWithDiam" minOccurs="0"/>
549                    <xs:element name="distal" type="Point3DWithDiam" minOccurs="1"/>
550                </xs:sequence>
551
552                <!-- TODO: Do we want to do away with numerical ids and just use unique strings/names in id attribute?? -->
553                <!--<xs:attribute name="id" type="SegmentId" use="required"/>-->
554                <xs:attribute name="name" type="xs:string" use="required"/>
555
556            </xs:extension>
557        </xs:complexContent>
558
559    </xs:complexType>
560
561    <xs:complexType name="SegmentParent">
562        <xs:attribute name="segment" type="SegmentId" use="required"/>
563        <xs:attribute name="fractionAlong" type="ZeroToOne" use="optional" default="1"/>
564    </xs:complexType>
565
566
567    <xs:complexType name="Point3DWithDiam">
568        <xs:annotation>
569            <xs:documentation>A 3D point with diameter.</xs:documentation>
570        </xs:annotation>
571        <xs:attribute name="x" type="xs:double" use="required"/>
572        <xs:attribute name="y" type="xs:double" use="required"/>
573        <xs:attribute name="z" type="xs:double" use="required"/>
574        <xs:attribute name="diameter" type="xs:double" use="required"/>
575    </xs:complexType>
576
577
578    <xs:complexType name="SegmentGroup">
579        <xs:complexContent>
580            <xs:extension base="Base">
581
582                <xs:sequence>
583                    <xs:element name="member" type="Member" minOccurs="0" maxOccurs="unbounded"/>
584                    <xs:element name="include" type="Include" minOccurs="0" maxOccurs="unbounded"/>
585                    <xs:element name="path" type="Path" minOccurs="0" maxOccurs="unbounded"/>
586                    <xs:element name="subTree" type="SubTree" minOccurs="0" maxOccurs="unbounded"/>
587                    <xs:element name="inhomogeneousParam" type="InhomogeneousParam" minOccurs="0" maxOccurs="unbounded"/>
588                </xs:sequence>
589
590            </xs:extension>
591        </xs:complexContent>
592    </xs:complexType>
593
594
595    <xs:complexType name="InhomogeneousParam">
596        <xs:complexContent>
597            <xs:extension base="Base">
598                <xs:sequence>
599                    <xs:element name="proximal" type="ProximalDetails" minOccurs="0"/>
600                    <xs:element name="distal" type="DistalDetails" minOccurs="0"/>
601                </xs:sequence>
602                <xs:attribute name="variable" type="xs:string" use="required"/>
603                <xs:attribute name="metric" type="Metric" use="required"/>
604            </xs:extension>
605        </xs:complexContent>
606    </xs:complexType>
607
608
609    <xs:simpleType name="Metric">
610        <xs:annotation>
611                <xs:documentation>Allowed metrics for InhomogeneousParam</xs:documentation>
612        </xs:annotation>
613        <xs:restriction base="xs:string">
614                <xs:enumeration value="Path Length from root"/>
615        </xs:restriction>
616    </xs:simpleType>
617
618
619    <xs:complexType name="ProximalDetails">
620        <xs:attribute name="translationStart" type="xs:double" use="required"/>
621    </xs:complexType>
622
623    <xs:complexType name="DistalDetails">
624        <xs:attribute name="normalizationEnd" type="xs:double" use="required"/>
625    </xs:complexType>
626
627    <xs:complexType name="Member">
628        <xs:attribute name="segment" type="SegmentId" use="required"/>
629    </xs:complexType>
630   
631    <xs:complexType name="Include">
632        <xs:attribute name="segmentGroup" type="NmlId" use="required"/>
633    </xs:complexType>
634   
635    <xs:complexType name="Path">
636        <xs:sequence>
637            <xs:element name="from" type="SegmentEndPoint" minOccurs="0"/>
638            <xs:element name="to" type="SegmentEndPoint" minOccurs="0"/>
639        </xs:sequence>
640    </xs:complexType>
641   
642    <xs:complexType name="SubTree">
643        <xs:choice>
644            <xs:element name="from" type="SegmentEndPoint" minOccurs="0"/>
645            <xs:element name="to" type="SegmentEndPoint" minOccurs="0"/>
646        </xs:choice>
647    </xs:complexType>
648   
649    <xs:complexType name="SegmentEndPoint">
650        <xs:attribute name="segment" type="SegmentId" use="required"/>
651    </xs:complexType>
652
653
654    <!--+++++++++++++++++++++++++++++++++++++++++++++++++++++++-->
655    <!--      Biophysical properties                           -->
656    <!--+++++++++++++++++++++++++++++++++++++++++++++++++++++++-->
657
658
659    <xs:complexType name="BiophysicalProperties">
660        <xs:annotation>
661            <xs:documentation>Standalone element which is usually inside a single cell, but could be outside and
662                              referenced by id.</xs:documentation>
663        </xs:annotation>
664        <xs:complexContent>
665            <xs:extension base="Standalone">
666
667                <xs:sequence>
668                    <xs:element name="membraneProperties" type="MembraneProperties"/>
669                    <xs:element name="intracellularProperties" type="IntracellularProperties" minOccurs="0"/>
670                    <xs:element name="extracellularProperties" type="ExtracellularProperties" minOccurs="0"/>
671                </xs:sequence>
672
673
674            </xs:extension>
675        </xs:complexContent>
676    </xs:complexType>
677
678
679    <xs:complexType name="MembraneProperties">
680
681        <xs:sequence>
682            <xs:element name="channelPopulation" type="ChannelPopulation" minOccurs="0" maxOccurs="unbounded"/>
683            <xs:element name="channelDensity" type="ChannelDensity" minOccurs="0" maxOccurs="unbounded"/>
684
685            <xs:element name="spikeThresh" type="ValueAcrossSegOrSegGroup" minOccurs="0" maxOccurs="unbounded"/>
686            <xs:element name="specificCapacitance" type="ValueAcrossSegOrSegGroup" minOccurs="0" maxOccurs="unbounded"/>
687
688            <xs:element name="initMembPotential" type="ValueAcrossSegOrSegGroup" minOccurs="0" maxOccurs="unbounded"/>
689           
690            <xs:element name="reversalPotential" type="ReversalPotential" minOccurs="0" maxOccurs="unbounded"/>
691           
692        </xs:sequence>
693
694    </xs:complexType>
695
696    <xs:complexType name="ChannelPopulation">
697
698        <xs:complexContent>
699            <xs:extension base="Base">
700
701                <xs:sequence>
702                        <xs:element name="variableParameter" type="VariableParameter" minOccurs="0" maxOccurs="unbounded"/>
703                </xs:sequence>
704
705                <xs:attribute name="ionChannel" type="NmlId" use="required"/>
706                <xs:attribute name="number" type="xs:nonNegativeInteger" use="required"/>
707
708                <xs:attribute name="erev" type="Nml2Quantity_voltage" use="optional"/>
709
710                <!-- Note: only one of the following should be used!! -->
711                <xs:attribute name="segmentGroup" type="NmlId" use="optional" default="all"/>
712                <xs:attribute name="segment" type="NmlId" use="optional"/>
713
714            </xs:extension>
715        </xs:complexContent>
716
717    </xs:complexType>
718
719    <xs:complexType name="ChannelDensity">
720
721        <xs:complexContent>
722            <xs:extension base="Base">
723                   
724                <xs:sequence>
725                        <xs:element name="variableParameter" type="VariableParameter" minOccurs="0" maxOccurs="unbounded"/>
726                </xs:sequence>
727
728                <xs:attribute name="ionChannel" type="NmlId" use="required"/>
729                <xs:attribute name="condDensity" type="Nml2Quantity_conductanceDensity" use="optional"/>
730
731                <xs:attribute name="erev" type="Nml2Quantity_voltage" use="optional"/>
732               
733                <!-- Note: only one of the following should be used!! -->
734                <xs:attribute name="segmentGroup" type="NmlId" use="optional" default="all"/>
735
736                <xs:attribute name="segment" type="NmlId" use="optional"/>
737
738                <xs:attribute name="ion" type="NmlId" use="optional">
739                    <xs:annotation>
740                        <xs:documentation>Specifying the ion here again is redundant, this will be set in ionChannel. It is added here
741                        TEMPORARILY as selecting all ca or na conducting channel populations/densities in a cell would be difficult otherwise.
742                        It should be removed in the longer term, due to possible inconsistencies in this value and that in the ionChannel
743                        element. TODO: remove.</xs:documentation>
744                    </xs:annotation>
745                </xs:attribute>
746
747            </xs:extension>
748        </xs:complexContent>
749       
750    </xs:complexType>
751
752    <xs:complexType name="ValueAcrossSegOrSegGroup">
753
754        <xs:attribute name="value" type="Nml2Quantity" use="optional"/>
755
756        <!-- Note: only one of the following should be used!! -->
757        <xs:attribute name="segmentGroup" type="NmlId" use="optional" default="all"/>
758        <xs:attribute name="segment" type="NmlId" use="optional"/>
759
760    </xs:complexType>
761
762
763    <xs:complexType name="VariableParameter">
764
765        <xs:sequence>
766            <xs:element name="inhomogeneousValue" type="InhomogeneousValue" minOccurs="0"/>
767        </xs:sequence>
768        <xs:attribute name="parameter" type="xs:string" use="required"/>
769        <xs:attribute name="segmentGroup" type="xs:string" use="required"/>
770
771    </xs:complexType>
772
773    <xs:complexType name="InhomogeneousValue">
774        <xs:attribute name="inhomogeneousParam" type="xs:string" use="required"/>
775        <xs:attribute name="value" type="xs:string" use="required"/>
776    </xs:complexType>
777
778
779    <xs:complexType name="ReversalPotential">
780
781        <xs:complexContent>
782            <xs:extension base="ValueAcrossSegOrSegGroup">
783                <xs:attribute name="species" type="NmlId" use="optional"/>
784            </xs:extension>
785        </xs:complexContent>
786
787    </xs:complexType>
788
789
790    <xs:complexType name="Species">
791
792        <xs:complexContent>
793            <xs:extension base="ValueAcrossSegOrSegGroup">
794                <xs:choice>
795                    <xs:element name="decayingPoolConcentrationModel" type="DecayingPoolConcentrationModel"/>
796                    <xs:element name="concentrationModel" type="ConcentrationModel_D"/>
797                    <xs:element name="fixedConcentration" type="FixedConcentration"/>
798                </xs:choice>
799                <xs:attribute name="id" type="NmlId" use="required"/>
800                <xs:attribute name="ion" type="NmlId" use="optional">
801                    <xs:annotation>
802                        <xs:documentation>Specifying the ion here again is redundant, the ion name should be the same as id. Kept for now
803                        until LEMS implementation can select by id. TODO: remove.</xs:documentation>
804                    </xs:annotation>
805                </xs:attribute>
806            </xs:extension>
807        </xs:complexContent>
808
809    </xs:complexType>
810
811
812
813    <xs:complexType name="FixedConcentration">
814        <xs:attribute name="concentration" type="Nml2Quantity_concentration" use="required"/>
815    </xs:complexType>
816
817    <xs:complexType name="DecayingPoolConcentrationModel">
818        <xs:attribute name="resting_conc" type="Nml2Quantity_concentration" use="required"/>
819        <xs:attribute name="decay_constant" type="Nml2Quantity_time" use="required"/>
820        <xs:attribute name="shell_thickness" type="Nml2Quantity_length" use="required"/>
821        <xs:attribute name="initialConcentration" type="Nml2Quantity_concentration" use="required"/>
822        <xs:attribute name="extConcentration" type="Nml2Quantity_concentration" use="optional"/>
823    </xs:complexType>
824
825 <!-- TODO: remove -->
826    <xs:complexType name="ConcentrationModel_D">
827
828        <xs:complexContent>
829            <xs:extension base="DecayingPoolConcentrationModel">
830
831                <xs:attribute name="type" use="required" fixed="decayingPoolConcentrationModel"/>
832
833            </xs:extension>
834        </xs:complexContent>
835    </xs:complexType>
836
837    <xs:complexType name="IntracellularProperties">
838
839        <xs:sequence>
840            <xs:element name="species" type="Species" minOccurs="0" maxOccurs="unbounded"/>
841            <xs:element name="resistivity" type="ValueAcrossSegOrSegGroup" minOccurs="0" maxOccurs="unbounded"/>
842        </xs:sequence>
843
844    </xs:complexType>
845
846    <xs:complexType name="ExtracellularProperties">
847
848        <xs:complexContent>
849            <xs:extension base="Base"> <!-- Should be standalone, but need some real elements below or XSD not valid... -->
850                <xs:sequence>
851                    <xs:element name="species" type="Species" minOccurs="0" maxOccurs="unbounded"/> <!-- Further elements will be specified!! -->
852                </xs:sequence>
853
854                <xs:attribute name="temperature" type="Nml2Quantity_temperature" use="optional"/>
855
856            </xs:extension>
857        </xs:complexContent>
858
859
860    </xs:complexType>
861
862    <xs:complexType name="ReactionScheme">
863
864        <xs:complexContent>
865            <xs:extension base="Base"> <!-- Should be standalone, but need some real elements below or XSD not valid... -->
866                <xs:sequence>
867                    <xs:any processContents="skip" minOccurs="0" maxOccurs="unbounded"/> <!-- Further elements will be specified!! -->
868                </xs:sequence>
869                <xs:attribute name="source" type="xs:string" use="required"/>
870                <xs:attribute name="type" type="xs:string" use="required"/>
871            </xs:extension>
872        </xs:complexContent>
873
874    </xs:complexType>
875
876
877
878    <!--+++++++++++++++++++++++++++++++++++++++++++++++++++++++-->
879    <!--      Inputs                                         -->
880    <!--+++++++++++++++++++++++++++++++++++++++++++++++++++++++-->
881
882
883<!--Will be updated in line with LEMS ComponentType definitions -->
884
885    <xs:complexType name="PulseGenerator">
886
887        <xs:complexContent>
888            <xs:extension base="Standalone">
889
890                <xs:attribute name="delay" type="Nml2Quantity_time" use="required"/>
891                <xs:attribute name="duration" type="Nml2Quantity_time" use="required"/>
892                <xs:attribute name="amplitude" type="Nml2Quantity_current" use="required"/>
893
894            </xs:extension>
895        </xs:complexContent>
896    </xs:complexType>
897
898    <!--+++++++++++++++++++++++++++++++++++++++++++++++++++++++-->
899    <!--      Networks                                         -->
900    <!--+++++++++++++++++++++++++++++++++++++++++++++++++++++++-->
901
902
903    <xs:complexType name="Network">
904
905        <xs:complexContent>
906            <xs:extension base="Standalone">
907                <xs:sequence>
908                    <xs:element name="space" type="Space" minOccurs="0" maxOccurs="unbounded"/>
909                    <xs:element name="region" type="Region" minOccurs="0" maxOccurs="unbounded"/>
910                    <xs:element name="population" type="Population" maxOccurs="unbounded"/>
911                    <xs:element name="cellSet" type="CellSet" minOccurs="0" maxOccurs="unbounded"/>
912                    <xs:element name="projection" type="Projection" minOccurs="0" maxOccurs="unbounded"/>
913                    <xs:element name="synapticConnection" type="SynapticConnection" minOccurs="0" maxOccurs="unbounded"/> <!--Will be updated in line with LEMS ComponentType definitions -->
914                    <xs:element name="connection" type="Connection" minOccurs="0" maxOccurs="unbounded"/> <!--Will be updated in line with LEMS ComponentType definitions -->
915                    <xs:element name="explicitInput" type="ExplicitInput" minOccurs="0" maxOccurs="unbounded"/> <!--Will be updated in line with LEMS ComponentType definitions -->
916                </xs:sequence>
917            </xs:extension>
918        </xs:complexContent>
919
920    </xs:complexType>
921
922
923    <xs:complexType name="Space"> <!-- Something onto which cells & networks can be laid out, e.g. n dim grid or n dim Euclidean space -->
924
925        <xs:complexContent>
926            <xs:extension base="Base">
927                <xs:sequence>
928                    <xs:element name="structure" type="SpaceStructure" minOccurs="0"/>
929                </xs:sequence>
930                <xs:attribute name="basedOn" type="allowedSpaces" use="optional"/>
931            </xs:extension>
932        </xs:complexContent>
933
934    </xs:complexType>
935
936    <xs:complexType name="SpaceStructure">
937                <xs:attribute name="xSpacing" type="xs:float"/>
938                <xs:attribute name="ySpacing" type="xs:float" use="optional"/> <!-- only use if >= 2D grid-->
939                <xs:attribute name="zSpacing" type="xs:float" use="optional"/> <!-- only use if 3D grid-->
940                <xs:attribute name="xStart" type="xs:float" use="optional" default="0"/>
941                <xs:attribute name="yStart" type="xs:float" use="optional" default="0"/> <!-- only use if >= 2D grid-->
942                <xs:attribute name="zStart" type="xs:float" use="optional" default="0"/> <!-- only use if 3D grid-->
943    </xs:complexType>
944
945
946    <xs:simpleType name="allowedSpaces">
947      <xs:restriction base="xs:string">
948        <xs:enumeration value="Euclidean_1D"/>
949        <xs:enumeration value="Euclidean_2D"/>
950        <xs:enumeration value="Euclidean_3D"/>
951        <xs:enumeration value="Grid_1D"/>
952        <xs:enumeration value="Grid_2D"/>
953        <xs:enumeration value="Grid_3D"/>
954      </xs:restriction>
955    </xs:simpleType>
956
957
958    <xs:complexType name="Region">
959
960        <xs:complexContent>
961            <xs:extension base="Base">
962                <xs:sequence>
963                    <xs:any processContents="skip" minOccurs="0" maxOccurs="unbounded"/> <!-- Further elements will be specified!! -->
964                </xs:sequence>
965
966                <xs:attribute name="space" type="NmlId" use="optional"/>
967            </xs:extension>
968        </xs:complexContent>
969
970    </xs:complexType>
971
972
973    <xs:complexType name="Population">
974
975        <xs:complexContent>
976            <xs:extension base="Standalone">
977                <xs:choice>
978                    <xs:element name="layout" type="Layout" minOccurs="0"/>
979                    <xs:element name="instances" type="Instances"/>
980                </xs:choice>
981
982                <xs:attribute name="cell" type="NmlId" use="optional"/>       <!-- Only one of these should be used!!! -->
983                <xs:attribute name="network" type="NmlId" use="optional"/>    <!-- Only one of these should be used!!! -->
984                <xs:attribute name="component" type="NmlId" use="optional"/>    <!-- Only one of these should be used!!! -->
985
986                <xs:attribute name="size" type="xs:integer" use="optional"/>    <!-- Temp!!! -->
987
988                <xs:attribute name="extracellularProperties" type="NmlId" use="optional"/>
989
990            </xs:extension>
991        </xs:complexContent>
992
993    </xs:complexType>
994
995
996    <xs:complexType name="Layout">
997
998                <xs:choice>
999                    <xs:element name="random" type="RandomLayout"/>
1000                    <xs:element name="grid" type="GridLayout"/>
1001                    <xs:element name="unstructured" type="UnstructuredLayout"/>
1002                </xs:choice>
1003
1004                <xs:attribute name="space" type="NmlId"/>
1005
1006    </xs:complexType>
1007
1008
1009
1010    <xs:complexType name="UnstructuredLayout">
1011                <xs:attribute name="number" type="xs:nonNegativeInteger"/>
1012    </xs:complexType>
1013
1014
1015    <xs:complexType name="RandomLayout">
1016                <xs:attribute name="number" type="xs:nonNegativeInteger"/>
1017                <xs:attribute name="region" type="NmlId"/>
1018    </xs:complexType>
1019
1020
1021    <xs:complexType name="GridLayout">
1022                <xs:attribute name="xSize" type="xs:nonNegativeInteger"/>
1023                <xs:attribute name="ySize" type="xs:nonNegativeInteger" use="optional"/> <!-- only use if >= 2D grid-->
1024                <xs:attribute name="zSize" type="xs:nonNegativeInteger" use="optional"/> <!-- only use if 3D grid-->
1025    </xs:complexType>
1026
1027
1028    <xs:complexType name="Instances">
1029                <xs:sequence>
1030                    <xs:element name="instance" type="Instance" maxOccurs="unbounded"/>
1031                </xs:sequence>
1032                <xs:attribute name="size" type="xs:nonNegativeInteger"/>
1033    </xs:complexType>
1034
1035    <xs:complexType name="Instance">
1036                <xs:sequence>
1037                    <xs:element name="location" type="Location"/>
1038                </xs:sequence>
1039                <xs:attribute name="id" type="xs:nonNegativeInteger"/>
1040                <xs:attribute name="i" type="xs:nonNegativeInteger"/>  <!-- for grid -->
1041                <xs:attribute name="j" type="xs:nonNegativeInteger"/>  <!-- for grid -->
1042                <xs:attribute name="k" type="xs:nonNegativeInteger"/>  <!-- for grid -->
1043    </xs:complexType>
1044
1045    <xs:complexType name="Location">
1046                <xs:attribute name="x" type="xs:float"/>
1047                <xs:attribute name="y" type="xs:float"/>
1048                <xs:attribute name="z" type="xs:float"/>
1049    </xs:complexType>
1050
1051
1052    <xs:complexType name="CellSet">
1053
1054        <xs:complexContent>
1055            <xs:extension base="Base">
1056                <xs:sequence>
1057                    <xs:any processContents="skip" minOccurs="0" maxOccurs="unbounded"/> <!-- Further elements will be specified!! -->
1058                </xs:sequence>
1059
1060                <xs:attribute name="select" type="xs:string" use="required"/>
1061            </xs:extension>
1062        </xs:complexContent>
1063
1064    </xs:complexType>
1065
1066
1067    <xs:complexType name="Projection">
1068
1069        <xs:complexContent>
1070            <xs:extension base="Base">
1071                <xs:sequence>
1072                    <xs:any processContents="skip" minOccurs="0" maxOccurs="unbounded"/> <!-- Further elements will be specified!! -->
1073                </xs:sequence>
1074            </xs:extension>
1075        </xs:complexContent>
1076
1077    </xs:complexType>
1078
1079
1080<!--Will be updated in line with LEMS ComponentType definitions -->
1081    <xs:complexType name="SynapticConnection">
1082                <xs:attribute name="from" type="xs:string"/>
1083                <xs:attribute name="to" type="xs:string"/>
1084                <xs:attribute name="synapse" type="xs:string"/>
1085    </xs:complexType>
1086
1087<!--Will be updated in line with LEMS ComponentType definitions -->
1088    <xs:complexType name="Connection">
1089                <xs:attribute name="from" type="xs:string"/>
1090                <xs:attribute name="to" type="xs:string"/>
1091    </xs:complexType>
1092
1093<!--Will be updated in line with LEMS ComponentType definitions -->
1094    <xs:complexType name="ExplicitInput">
1095                <xs:attribute name="target" type="xs:string"/>
1096                <xs:attribute name="input" type="xs:string"/>
1097    </xs:complexType>
1098
1099
1100
1101    <!--+++++++++++++++++++++++++++++++++++++++++++++++++++++++-->
1102    <!--      Further Core elements                                    -->
1103    <!--+++++++++++++++++++++++++++++++++++++++++++++++++++++++-->
1104
1105    <!--NOTE: Base and Standalone definitions moved to end of file, as some XML language binding
1106        generators, e.g. generateDS.py, require superclasses to be defined after the subclasses... -->
1107
1108    <xs:complexType name="Base">
1109           
1110        <xs:annotation>
1111            <xs:documentation>Anything which can have a unique id (within its parent) i.e. most elements.</xs:documentation>
1112        </xs:annotation>
1113
1114        <xs:attribute name="id" type="NmlId" use="required"/>
1115
1116        <xs:attribute name="neuroLexId" type="NeuroLexId" use="optional"/>
1117
1118    </xs:complexType>
1119
1120
1121    <xs:complexType name="Standalone">
1122
1123        <xs:annotation>
1124            <xs:documentation>Elements which can stand alone and be referenced by id, e.g. cell, morphology.</xs:documentation>
1125        </xs:annotation>
1126
1127        <xs:complexContent>
1128            <xs:extension base="Base">
1129                <xs:sequence>
1130                    <xs:element name="notes" type="Notes" minOccurs="0"/> <!-- More metadata needed -->
1131                    <xs:element name="annotation" type="Annotation" minOccurs="0"/> <!-- More metadata needed -->
1132                </xs:sequence>
1133                <xs:attribute name="metaid" type="MetaId" use="optional"/>
1134
1135            </xs:extension>
1136        </xs:complexContent>
1137
1138    </xs:complexType>
1139
1140</xs:schema>
1141
1142
1143
Note: See TracBrowser for help on using the browser.