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