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