in progress...
[jalview.git] / forester / resources / phyloxml_schema / 1.00 / phyloxml.xsd
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--                                                 -->
3 <!-- phyloXML                                        -->
4 <!--                                                 -->
5 <!-- schema in XMLSchema                             -->
6 <!-- License: LGPL                                   -->
7 <!-- Copyright (c) 2008-2009 Christian M Zmasek      -->
8 <!-- www.phyloxml.org                                -->
9 <!-- Version: 1.00                                   -->
10 <!-- Last modified: 2008.04.18 by Christian M Zmasek -->
11 <!--                                                 -->
12 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:phy="http://www.phyloxml.org"
13    targetNamespace="http://www.phyloxml.org" elementFormDefault="qualified" attributeFormDefault="unqualified">
14    <xs:annotation>
15       <xs:documentation> phyloXML is an XML language to describe phylogenies and associated data. Version: 1.00.
16          License: LGPL. Copyright (c) 2008-2009 Christian M Zmasek.</xs:documentation>
17    </xs:annotation>
18    <!-- phyloxml is the root element:-->
19    <xs:element name="phyloxml" type="phy:Phyloxml"/>
20    <!-- phyloXML definition:-->
21    <xs:complexType name="Phyloxml">
22       <xs:annotation>
23          <xs:documentation> 'phyloxml' is the name of the root element. Phyloxml contains an arbitrary number of
24             'phylogeny' elements (each representing one phylogeny) possibly followed by elements from other namespaces.
25          </xs:documentation>
26       </xs:annotation>
27       <xs:sequence maxOccurs="unbounded">
28          <xs:element name="phylogeny" type="phy:Phylogeny" minOccurs="0" maxOccurs="unbounded"/>
29          <xs:any minOccurs="0" maxOccurs="unbounded" processContents="lax" namespace="##other"/>
30       </xs:sequence>
31    </xs:complexType>
32    <!-- Phylogeny:-->
33    <xs:complexType name="Phylogeny">
34       <xs:annotation>
35          <xs:documentation> Element Phylogeny is used to represent a phylogeny. The required attribute 'rooted' is used
36             to indicate whether the phylogeny is rooted or not. The attribute 'rerootable' can be used to indicate that
37             the phylogeny is not allowed to be rooted differently (i.e. because it is associated with root dependent
38             data, such as gene duplications). The attribute 'type' can be used to indicate the type of phylogeny (i.e.
39             'gene tree'). It is recommended to use the attribute 'branch_length_unit' if the phylogeny has branch
40             lengths. Element clade is used in a recursive manner to describe the topology of a phylogenetic
41          tree.</xs:documentation>
42       </xs:annotation>
43       <xs:sequence>
44          <xs:element name="name" type="xs:token" minOccurs="0"/>
45          <xs:element name="id" type="phy:Id" minOccurs="0"/>
46          <xs:element name="description" type="xs:token" minOccurs="0"/>
47          <xs:element name="date" type="xs:dateTime" minOccurs="0"/>
48          <xs:element name="confidence" type="phy:Confidence" minOccurs="0" maxOccurs="unbounded"/>
49          <xs:element name="clade" type="phy:Clade" minOccurs="0"/>
50          <xs:element name="clade_relation" type="phy:CladeRelation" minOccurs="0" maxOccurs="unbounded"/>
51          <xs:element name="sequence_relation" type="phy:SequenceRelation" minOccurs="0" maxOccurs="unbounded"/>
52          <xs:element name="property" type="phy:Property" minOccurs="0" maxOccurs="unbounded"/>
53          <xs:any minOccurs="0" maxOccurs="unbounded" processContents="lax" namespace="##other"/>
54       </xs:sequence>
55       <xs:attribute name="rooted" type="xs:boolean" use="required"/>
56       <xs:attribute name="rerootable" type="xs:boolean"/>
57       <xs:attribute name="branch_length_unit" type="xs:token"/>
58       <xs:attribute name="type" type="xs:token"/>
59    </xs:complexType>
60    <!-- Clade:-->
61    <xs:complexType name="Clade">
62       <xs:annotation>
63          <xs:documentation> Element Clade is used in a recursive manner to describe the topology of a phylogenetic tree.
64             The parent branch length of a clade can be described either with the 'branch_length' element or the
65             'branch_length' attribute (it is not recommended to use both at the same time, though). Usage of the
66             'branch_length' attribute allows for a less verbose description. Element 'confidence' is used to indicate
67             the support for a clade/parent branch. Element 'events' is used to describe such events as gene-duplications
68             at the root node/parent branch of a clade. Element 'width' is the branch width for this clade (including
69             parent branch). Both 'color' and 'width' elements apply for the whole clade unless overwritten in-sub
70             clades. Attribute 'id_source' is used to link other elements to a clade (on the xml-level).
71          </xs:documentation>
72       </xs:annotation>
73       <xs:sequence>
74          <xs:element name="name" type="xs:token" minOccurs="0"/>
75          <xs:element name="branch_length" type="xs:double" minOccurs="0"/>
76          <xs:element name="confidence" type="phy:Confidence" minOccurs="0" maxOccurs="unbounded"/>
77          <xs:element name="width" type="xs:double" minOccurs="0"/>
78          <xs:element name="color" type="phy:BranchColor" minOccurs="0"/>
79          <xs:element name="node_id" type="phy:Id" minOccurs="0"/>
80          <xs:element name="taxonomy" type="phy:Taxonomy" minOccurs="0" maxOccurs="unbounded"/>
81          <xs:element name="sequence" type="phy:Sequence" minOccurs="0" maxOccurs="unbounded"/>
82          <xs:element name="events" type="phy:Events" minOccurs="0"/>
83          <xs:element name="binary_characters" type="phy:BinaryCharacters" minOccurs="0"/>
84          <xs:element name="distribution" type="phy:Distribution" minOccurs="0" maxOccurs="unbounded"/>
85          <xs:element name="date" type="phy:Date" minOccurs="0"/>
86          <xs:element name="reference" type="phy:Reference" minOccurs="0" maxOccurs="unbounded"/>
87          <xs:element name="property" type="phy:Property" minOccurs="0" maxOccurs="unbounded"/>
88          <xs:element name="clade" type="phy:Clade" minOccurs="0" maxOccurs="unbounded"/>
89          <xs:any minOccurs="0" maxOccurs="unbounded" processContents="lax" namespace="##other"/>
90       </xs:sequence>
91       <xs:attribute name="branch_length" type="xs:double"/>
92       <xs:attribute name="id_source" type="phy:id_source"/>
93    </xs:complexType>
94    <!-- Taxonomy:-->
95    <xs:complexType name="Taxonomy">
96       <xs:annotation>
97          <xs:documentation> Element Taxonomy is used to describe taxonomic information for a clade. Element 'code' is
98             intended to store UniProt/Swiss-Prot style organism codes (e.g. 'APLCA' for the California sea hare 'Aplysia
99             californica'). Element 'id' is used for a unique identifier of a taxon (for example '6500' with
100             'ncbi_taxonomy' as 'type' for the California sea hare). Attribute 'id_source' is used to link other elements
101             to a taxonomy (on the xml-level).</xs:documentation>
102       </xs:annotation>
103       <xs:sequence>
104          <xs:element name="id" type="phy:Id" minOccurs="0"/>
105          <xs:element name="code" type="phy:TaxonomyCode" minOccurs="0"/>
106          <xs:element name="scientific_name" type="xs:token" minOccurs="0"/>
107          <xs:element name="common_name" type="xs:token" minOccurs="0" maxOccurs="unbounded"/>
108          <xs:element name="rank" type="phy:Rank" minOccurs="0"/>
109          <xs:element name="uri" type="phy:Uri" minOccurs="0"/>
110          <xs:any minOccurs="0" maxOccurs="unbounded" processContents="lax" namespace="##other"/>
111       </xs:sequence>
112       <xs:attribute name="type" type="xs:token"/>
113       <xs:attribute name="id_source" type="phy:id_source"/>
114    </xs:complexType>
115    <xs:simpleType name="TaxonomyCode">
116       <xs:restriction base="xs:token">
117          <xs:pattern value="[a-zA-Z0-9_]{2,10}"/>
118       </xs:restriction>
119    </xs:simpleType>
120    <xs:simpleType name="Rank">
121       <xs:restriction base="xs:token">
122          <xs:enumeration value="domain"/>
123          <xs:enumeration value="kingdom"/>
124          <xs:enumeration value="subkingdom"/>
125          <xs:enumeration value="branch"/>
126          <xs:enumeration value="infrakingdom"/>
127          <xs:enumeration value="superphylum"/>
128          <xs:enumeration value="phylum"/>
129          <xs:enumeration value="subphylum"/>
130          <xs:enumeration value="infraphylum"/>
131          <xs:enumeration value="microphylum"/>
132          <xs:enumeration value="superdivision"/>
133          <xs:enumeration value="division"/>
134          <xs:enumeration value="subdivision"/>
135          <xs:enumeration value="infradivision"/>
136          <xs:enumeration value="superclass"/>
137          <xs:enumeration value="class"/>
138          <xs:enumeration value="subclass"/>
139          <xs:enumeration value="infraclass"/>
140          <xs:enumeration value="superlegion"/>
141          <xs:enumeration value="legion"/>
142          <xs:enumeration value="sublegion"/>
143          <xs:enumeration value="infralegion"/>
144          <xs:enumeration value="supercohort"/>
145          <xs:enumeration value="cohort"/>
146          <xs:enumeration value="subcohort"/>
147          <xs:enumeration value="infracohort"/>
148          <xs:enumeration value="superorder"/>
149          <xs:enumeration value="order"/>
150          <xs:enumeration value="suborder"/>
151          <xs:enumeration value="superfamily"/>
152          <xs:enumeration value="family"/>
153          <xs:enumeration value="subfamily"/>
154          <xs:enumeration value="supertribe"/>
155          <xs:enumeration value="tribe"/>
156          <xs:enumeration value="subtribe"/>
157          <xs:enumeration value="infratribe"/>
158          <xs:enumeration value="genus"/>
159          <xs:enumeration value="subgenus"/>
160          <xs:enumeration value="superspecies"/>
161          <xs:enumeration value="species"/>
162          <xs:enumeration value="subspecies"/>
163          <xs:enumeration value="variety"/>
164          <xs:enumeration value="subvariety"/>
165          <xs:enumeration value="form"/>
166          <xs:enumeration value="subform"/>
167          <xs:enumeration value="cultivar"/>
168          <xs:enumeration value="unknown"/>
169          <xs:enumeration value="other"/>
170       </xs:restriction>
171    </xs:simpleType>
172    <!-- Sequence:-->
173    <xs:complexType name="Sequence">
174       <xs:annotation>
175          <xs:documentation> Element Sequence is used to represent a molecular sequence (Protein, DNA, RNA) associated
176             with a node. 'symbol' is a short (maximal ten characters) symbol of the sequence (e.g. 'ACTM') whereas
177             'name' is used for the full name (e.g. 'muscle Actin'). 'location' is used for the location of a sequence on
178             a genome/chromosome. The actual sequence can be stored with the 'mol_seq' element. Attribute 'type' is used
179             to indicate the type of sequence ('dna', 'rna', or 'aa'). One intended use for 'id_ref' is to link a
180             sequence to a taxonomy (via the taxonomy's 'id_source') in case of multiple sequences and taxonomies per
181             node. </xs:documentation>
182       </xs:annotation>
183       <xs:sequence>
184          <xs:element name="symbol" type="phy:SequenceSymbol" minOccurs="0"/>
185          <xs:element name="accession" type="phy:Accession" minOccurs="0"/>
186          <xs:element name="name" type="xs:token" minOccurs="0"/>
187          <xs:element name="location" type="xs:token" minOccurs="0"/>
188          <xs:element name="mol_seq" type="phy:MolSeq" minOccurs="0"/>
189          <xs:element name="uri" type="phy:Uri" minOccurs="0"/>
190          <xs:element name="annotation" type="phy:Annotation" minOccurs="0" maxOccurs="unbounded"/>
191          <xs:element name="domain_architecture" type="phy:DomainArchitecture" minOccurs="0"/>
192          <xs:any minOccurs="0" maxOccurs="unbounded" processContents="lax" namespace="##other"/>
193       </xs:sequence>
194       <xs:attribute name="type" type="phy:SequenceType"/>
195       <xs:attribute name="id_source" type="phy:id_source"/>
196       <xs:attribute name="id_ref" type="phy:id_ref"/>
197    </xs:complexType>
198    <xs:simpleType name="MolSeq">
199       <xs:restriction base="xs:token">
200          <xs:pattern value="[a-zA-Z\.\-\?\*_]+"/>
201       </xs:restriction>
202    </xs:simpleType>
203    <xs:simpleType name="SequenceSymbol">
204       <xs:restriction base="xs:token">
205          <xs:pattern value="\S{1,10}"/>
206       </xs:restriction>
207    </xs:simpleType>
208    <xs:simpleType name="SequenceType">
209       <xs:restriction base="xs:token">
210          <xs:enumeration value="rna"/>
211          <xs:enumeration value="dna"/>
212          <xs:enumeration value="aa"/>
213       </xs:restriction>
214    </xs:simpleType>
215    <!-- Accession:-->
216    <xs:complexType name="Accession">
217       <xs:annotation>
218          <xs:documentation> Element Accession is used to capture the local part in a sequence identifier (e.g. 'P17304'
219             in 'UniProtKB:P17304', in which case the 'source' attribute would be 'UniProtKB'). </xs:documentation>
220       </xs:annotation>
221       <xs:simpleContent>
222          <xs:extension base="xs:token">
223             <xs:attribute name="source" type="xs:token" use="required"/>
224          </xs:extension>
225       </xs:simpleContent>
226    </xs:complexType>
227    <!-- DomainArchitecture: -->
228    <xs:complexType name="DomainArchitecture">
229       <xs:annotation>
230          <xs:documentation> This is used describe the domain architecture of a protein. Attribute 'length' is the total
231             length of the protein</xs:documentation>
232       </xs:annotation>
233       <xs:sequence>
234          <xs:element name="domain" type="phy:ProteinDomain" minOccurs="1" maxOccurs="unbounded"/>
235       </xs:sequence>
236       <xs:attribute name="length" type="xs:nonNegativeInteger"/>
237    </xs:complexType>
238    <xs:complexType name="ProteinDomain">
239       <xs:annotation>
240          <xs:documentation> To represent an individual domain in a domain architecture. The name/unique identifier is
241             described via the 'id' attribute. 'confidence' can be used to store (i.e.) E-values.</xs:documentation>
242       </xs:annotation>
243       <xs:simpleContent>
244          <xs:extension base="xs:token">
245             <xs:attribute name="from" type="xs:nonNegativeInteger" use="required"/>
246             <xs:attribute name="to" type="xs:nonNegativeInteger" use="required"/>
247             <xs:attribute name="confidence" type="xs:double"/>
248             <xs:attribute name="id" type="xs:token"/>
249          </xs:extension>
250       </xs:simpleContent>
251    </xs:complexType>
252    <!-- Events:-->
253    <xs:complexType name="Events">
254       <xs:annotation>
255          <xs:documentation> Events at the root node of a clade (e.g. one gene duplication). </xs:documentation>
256       </xs:annotation>
257       <xs:sequence>
258          <xs:element name="type" type="phy:EventType" minOccurs="0"/>
259          <xs:element name="duplications" type="xs:nonNegativeInteger" minOccurs="0"/>
260          <xs:element name="speciations" type="xs:nonNegativeInteger" minOccurs="0"/>
261          <xs:element name="losses" type="xs:nonNegativeInteger" minOccurs="0"/>
262          <xs:element name="confidence" type="phy:Confidence" minOccurs="0"/>
263       </xs:sequence>
264    </xs:complexType>
265    <xs:simpleType name="EventType">
266       <xs:restriction base="xs:token">
267          <xs:enumeration value="transfer"/>
268          <xs:enumeration value="fusion"/>
269          <xs:enumeration value="speciation_or_duplication"/>
270          <xs:enumeration value="other"/>
271          <xs:enumeration value="mixed"/>
272          <xs:enumeration value="unassigned"/>
273       </xs:restriction>
274    </xs:simpleType>
275    <!--BinaryCharacters:-->
276    <xs:complexType name="BinaryCharacters">
277       <xs:annotation>
278          <xs:documentation> The names and/or counts of binary characters present, gained, and lost at the root of a
279             clade. </xs:documentation>
280       </xs:annotation>
281       <xs:sequence>
282          <xs:element name="gained" type="phy:BinaryCharacterList" minOccurs="0"/>
283          <xs:element name="lost" type="phy:BinaryCharacterList" minOccurs="0"/>
284          <xs:element name="present" type="phy:BinaryCharacterList" minOccurs="0"/>
285          <xs:element name="absent" type="phy:BinaryCharacterList" minOccurs="0"/>
286       </xs:sequence>
287       <xs:attribute name="type" type="xs:token"/>
288       <xs:attribute name="gained_count" type="xs:nonNegativeInteger"/>
289       <xs:attribute name="lost_count" type="xs:nonNegativeInteger"/>
290       <xs:attribute name="present_count" type="xs:nonNegativeInteger"/>
291       <xs:attribute name="absent_count" type="xs:nonNegativeInteger"/>
292    </xs:complexType>
293    <xs:complexType name="BinaryCharacterList">
294       <xs:sequence>
295          <xs:element name="bc" type="xs:token" maxOccurs="unbounded"/>
296       </xs:sequence>
297    </xs:complexType>
298    <!-- Reference:-->
299    <xs:complexType name="Reference">
300       <xs:annotation>
301          <xs:documentation> A literature reference for a clade. It is recommended to use the 'doi' attribute instead of
302             the free text 'desc' element whenever possible. </xs:documentation>
303       </xs:annotation>
304       <xs:sequence>
305          <xs:element name="desc" type="xs:token" minOccurs="0"/>
306       </xs:sequence>
307       <xs:attribute name="doi" type="phy:Doi"/>
308    </xs:complexType>
309    <xs:simpleType name="Doi">
310       <xs:restriction base="xs:token">
311          <xs:pattern value="[a-zA-Z0-9_\.]+/\S+"/>
312       </xs:restriction>
313    </xs:simpleType>
314    <!-- Annotation:-->
315    <xs:complexType name="Annotation">
316       <xs:annotation>
317          <xs:documentation> The annotation of a molecular sequence. It is recommended to annotate by using the optional
318             'ref' attribute (some examples of acceptable values for the ref attribute: 'GO:0008270',
319             'KEGG:Tetrachloroethene degradation', 'EC:1.1.1.1'). Optional element 'desc' allows for a free text
320             description. Optional element 'confidence' is used to state the type and value of support for a annotation.
321             Similarly, optional attribute 'evidence' is used to describe the evidence for a annotation as free text
322             (e.g. 'experimental'). Optional element 'property' allows for further, typed and referenced annotations from
323             external resources.</xs:documentation>
324       </xs:annotation>
325       <xs:sequence>
326          <xs:element name="desc" type="xs:token" minOccurs="0"/>
327          <xs:element name="confidence" type="phy:Confidence" minOccurs="0"/>
328          <xs:element name="property" type="phy:Property" minOccurs="0" maxOccurs="unbounded"/>
329          <xs:element name="uri" type="phy:Uri" minOccurs="0"/>
330       </xs:sequence>
331       <xs:attribute name="ref" type="phy:ref"/>
332       <xs:attribute name="source" type="xs:token"/>
333       <xs:attribute name="evidence" type="xs:token"/>
334       <xs:attribute name="type" type="xs:token"/>
335    </xs:complexType>
336    <!-- Property:-->
337    <xs:complexType name="Property" mixed="true">
338       <xs:annotation>
339          <xs:documentation> Property allows for typed and referenced properties from external resources to be attached
340             to 'Phylogeny', 'Clade', and 'Annotation'. The value of a property is its mixed (free text) content.
341             Attribute 'datatype' indicates the type of a property and is limited to xsd-datatypes (e.g. 'xsd:string',
342             'xsd:boolean', 'xsd:integer', 'xsd:decimal', 'xsd:float', 'xsd:double', 'xsd:date', 'xsd:anyURI'). Attribute
343             'applies_to' indicates the item to which a property applies to (e.g. 'node' for the parent node of a clade,
344             'parent_branch' for the parent branch of a clade). Attribute 'id_ref' allows to attached a property
345             specifically to one element (on the xml-level). Optional attribute 'unit' is used to indicate the unit of
346             the property. An example: &lt;property datatype="xsd:integer" ref="NOAA:depth" applies_to="clade"
347             unit="METRIC:m"&gt; 200 &lt;/property&gt; </xs:documentation>
348       </xs:annotation>
349       <xs:attribute name="ref" type="phy:ref" use="required"/>
350       <xs:attribute name="unit" type="phy:ref"/>
351       <xs:attribute name="datatype" type="phy:PropertyDataType" use="required"/>
352       <xs:attribute name="applies_to" type="phy:AppliesTo" use="required"/>
353       <xs:attribute name="id_ref" type="phy:id_ref"/>
354    </xs:complexType>
355    <xs:simpleType name="ref">
356       <xs:restriction base="xs:token">
357          <xs:pattern value="[a-zA-Z0-9_]+:[a-zA-Z0-9_\.\-\s]+"/>
358       </xs:restriction>
359    </xs:simpleType>
360    <xs:simpleType name="AppliesTo">
361       <xs:restriction base="xs:token">
362          <xs:enumeration value="phylogeny"/>
363          <xs:enumeration value="clade"/>
364          <xs:enumeration value="node"/>
365          <xs:enumeration value="annotation"/>
366          <xs:enumeration value="parent_branch"/>
367          <xs:enumeration value="other"/>
368       </xs:restriction>
369    </xs:simpleType>
370    <xs:simpleType name="PropertyDataType">
371       <xs:restriction base="xs:token">
372          <xs:enumeration value="xsd:string"/>
373          <xs:enumeration value="xsd:boolean"/>
374          <xs:enumeration value="xsd:decimal"/>
375          <xs:enumeration value="xsd:float"/>
376          <xs:enumeration value="xsd:double"/>
377          <xs:enumeration value="xsd:duration"/>
378          <xs:enumeration value="xsd:dateTime"/>
379          <xs:enumeration value="xsd:time"/>
380          <xs:enumeration value="xsd:date"/>
381          <xs:enumeration value="xsd:gYearMonth"/>
382          <xs:enumeration value="xsd:gYear"/>
383          <xs:enumeration value="xsd:gMonthDay"/>
384          <xs:enumeration value="xsd:gDay"/>
385          <xs:enumeration value="xsd:gMonth"/>
386          <xs:enumeration value="xsd:hexBinary"/>
387          <xs:enumeration value="xsd:base64Binary"/>
388          <xs:enumeration value="xsd:anyURI"/>
389          <xs:enumeration value="xsd:normalizedString"/>
390          <xs:enumeration value="xsd:token"/>
391          <xs:enumeration value="xsd:integer"/>
392          <xs:enumeration value="xsd:nonPositiveInteger"/>
393          <xs:enumeration value="xsd:negativeInteger"/>
394          <xs:enumeration value="xsd:long"/>
395          <xs:enumeration value="xsd:int"/>
396          <xs:enumeration value="xsd:short"/>
397          <xs:enumeration value="xsd:byte"/>
398          <xs:enumeration value="xsd:nonNegativeInteger"/>
399          <xs:enumeration value="xsd:unsignedLong"/>
400          <xs:enumeration value="xsd:unsignedInt"/>
401          <xs:enumeration value="xsd:unsignedShort"/>
402          <xs:enumeration value="xsd:unsignedByte"/>
403          <xs:enumeration value="xsd:positiveInteger"/>
404       </xs:restriction>
405    </xs:simpleType>
406    <!--Uri-->
407    <xs:complexType name="Uri">
408       <xs:annotation>
409          <xs:documentation> A uniform resource identifier. In general, this is expected to be an URL (for example, to
410             link to an image on a website, in which case the 'type' attribute might be 'image' and 'desc' might be
411             'image of a California sea hare'). </xs:documentation>
412       </xs:annotation>
413       <xs:simpleContent>
414          <xs:extension base="xs:anyURI">
415             <xs:attribute name="desc" type="xs:token"/>
416             <xs:attribute name="type" type="xs:token"/>
417          </xs:extension>
418       </xs:simpleContent>
419    </xs:complexType>
420    <!-- Confidence:-->
421    <xs:complexType name="Confidence">
422       <xs:annotation>
423          <xs:documentation> A general purpose confidence element. For example this can be used to express the bootstrap
424             support value of a clade (in which case the 'type' attribute is 'bootstrap').</xs:documentation>
425       </xs:annotation>
426       <xs:simpleContent>
427          <xs:extension base="xs:double">
428             <xs:attribute name="type" type="xs:token" use="required"/>
429          </xs:extension>
430       </xs:simpleContent>
431    </xs:complexType>
432    <!-- Identifier:-->
433    <xs:complexType name="Id">
434       <xs:annotation>
435          <xs:documentation> A general purpose identifier element. Allows to indicate the type (or source) of an
436             identifier. </xs:documentation>
437       </xs:annotation>
438       <xs:simpleContent>
439          <xs:extension base="xs:token">
440             <xs:attribute name="type" type="xs:token"/>
441          </xs:extension>
442       </xs:simpleContent>
443    </xs:complexType>
444    <!-- Distribution:-->
445    <xs:complexType name="Distribution">
446       <xs:annotation>
447          <xs:documentation> The geographic distribution of the items of a clade (species, sequences), intended for
448             phylogeographic applications. The location can be described either by free text in the 'desc' element and/or
449             by the coordinates of one or more 'Points' (similar to the 'Point' element in Google's KML format) or by
450             'Polygons'. </xs:documentation>
451       </xs:annotation>
452       <xs:sequence>
453          <xs:element name="desc" type="xs:token" minOccurs="0"/>
454          <xs:element name="point" type="phy:Point" minOccurs="0" maxOccurs="unbounded"/>
455          <xs:element name="polygon" type="phy:Polygon" minOccurs="0" maxOccurs="unbounded"/>
456       </xs:sequence>
457    </xs:complexType>
458    <xs:complexType name="Point">
459       <xs:annotation>
460          <xs:documentation> The coordinates of a point with an optional altitude (used by element 'Distribution').
461             Required attribute 'geodetic_datum' is used to indicate the geodetic datum (also called 'map datum'), for
462             example Google's KML uses 'WGS84'. </xs:documentation>
463       </xs:annotation>
464       <xs:sequence>
465          <xs:element name="lat" type="xs:decimal"/>
466          <xs:element name="long" type="xs:decimal"/>
467          <xs:element name="alt" type="xs:decimal" minOccurs="0"/>
468       </xs:sequence>
469       <xs:attribute name="geodetic_datum" type="xs:token" use="required"/>
470    </xs:complexType>
471    <xs:complexType name="Polygon">
472       <xs:annotation>
473          <xs:documentation> A polygon defined by a list of 'Points' (used by element 'Distribution').
474          </xs:documentation>
475       </xs:annotation>
476       <xs:sequence>
477          <xs:element name="point" type="phy:Point" minOccurs="3" maxOccurs="unbounded"/>
478       </xs:sequence>
479    </xs:complexType>
480    <!-- Date:-->
481    <xs:complexType name="Date">
482       <xs:annotation>
483          <xs:documentation> A date associated with a clade/node. Its value can be numerical by using the 'value' element
484             and/or free text with the 'desc' element' (e.g. 'Silurian'). If a numerical value is used, it is recommended
485             to employ the 'unit' attribute to indicate the type of the numerical value (e.g. 'mya' for 'million years
486             ago'). </xs:documentation>
487       </xs:annotation>
488       <xs:sequence>
489          <xs:element name="desc" type="xs:token" minOccurs="0"/>
490          <xs:element name="value" type="xs:decimal" minOccurs="0"/>
491       </xs:sequence>
492       <xs:attribute name="unit" type="xs:token"/>
493       <xs:attribute name="range" type="xs:decimal"/>
494    </xs:complexType>
495    <!-- BranchColor:-->
496    <xs:complexType name="BranchColor">
497       <xs:annotation>
498          <xs:documentation> This indicates the color of a clade when rendered (the color applies to the whole clade
499             unless overwritten by the color(s) of sub clades).</xs:documentation>
500       </xs:annotation>
501       <xs:sequence>
502          <xs:element name="red" type="xs:unsignedByte"/>
503          <xs:element name="green" type="xs:unsignedByte"/>
504          <xs:element name="blue" type="xs:unsignedByte"/>
505       </xs:sequence>
506    </xs:complexType>
507    <!-- SequenceRelation:-->
508    <xs:complexType name="SequenceRelation">
509       <xs:annotation>
510          <xs:documentation> This is used to express a typed relationship between two sequences. For example it could be
511             used to describe an orthology (in which case attribute 'type' is 'orthology'). </xs:documentation>
512       </xs:annotation>
513       <xs:sequence>
514          <xs:element name="confidence" type="phy:Confidence" minOccurs="0"/>
515       </xs:sequence>
516       <xs:attribute name="id_ref_0" type="phy:id_ref" use="required"/>
517       <xs:attribute name="id_ref_1" type="phy:id_ref" use="required"/>
518       <xs:attribute name="distance" type="xs:double"/>
519       <xs:attribute name="type" type="phy:SequenceRelationType" use="required"/>
520    </xs:complexType>
521    <xs:simpleType name="SequenceRelationType">
522       <xs:restriction base="xs:token">
523          <xs:enumeration value="orthology"/>
524          <xs:enumeration value="one_to_one_orthology"/>
525          <xs:enumeration value="super_orthology"/>
526          <xs:enumeration value="paralogy"/>
527          <xs:enumeration value="ultra_paralogy"/>
528          <xs:enumeration value="xenology"/>
529          <xs:enumeration value="unknown"/>
530          <xs:enumeration value="other"/>
531       </xs:restriction>
532    </xs:simpleType>
533    <!-- CladeRelation:-->
534    <xs:complexType name="CladeRelation">
535       <xs:annotation>
536          <xs:documentation> This is used to express a typed relationship between two clades. For example it could be
537             used to describe multiple parents of a clade.</xs:documentation>
538       </xs:annotation>
539       <xs:sequence>
540          <xs:element name="confidence" type="phy:Confidence" minOccurs="0"/>
541       </xs:sequence>
542       <xs:attribute name="id_ref_0" type="phy:id_ref" use="required"/>
543       <xs:attribute name="id_ref_1" type="phy:id_ref" use="required"/>
544       <xs:attribute name="distance" type="xs:double"/>
545       <xs:attribute name="type" type="xs:token" use="required"/>
546    </xs:complexType>
547    <!-- Used to link elements together on the xml level:-->
548    <xs:simpleType name="id_source">
549       <xs:restriction base="xs:ID"/>
550    </xs:simpleType>
551    <xs:simpleType name="id_ref">
552       <xs:restriction base="xs:IDREF"/>
553    </xs:simpleType>
554 </xs:schema>