~ubuntu-branches/debian/stretch/r-cran-rnexml/stretch

« back to all changes in this revision

Viewing changes to inst/examples/taxa.xml

  • Committer: Package Import Robot
  • Author(s): Andreas Tille
  • Date: 2016-04-08 13:58:39 UTC
  • Revision ID: package-import@ubuntu.com-20160408135839-ilq08z8v8p414qpn
Tags: upstream-2.0.6
ImportĀ upstreamĀ versionĀ 2.0.6

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" encoding="ISO-8859-1"?>
 
2
<!-- 
 
3
        This file is an example of a simple taxa block.
 
4
-->
 
5
<!-- 
 
6
        The nexml root element below is structured as follows:
 
7
                * there is a required version attribute. Additions where
 
8
                  the 'core' remains backward compatible are identified
 
9
                  by decimal increases (1.1, 1.2, etc.). Changes to the
 
10
                  core standard are identified by integer increases (2.0,
 
11
                  3.0, etc.). The former is somewhat likely to happen in
 
12
                  practice, the latter hopefully isn't.
 
13
                  
 
14
                * In some places in instance documents, snippets of schema
 
15
                  language code are necessary, for example to specify 
 
16
                  concrete subclasses. Such snippets are bound to the 
 
17
                  http://www.w3.org/2001/XMLSchema-instance namespace, and
 
18
                  by convention identified by the 'xsi' prefix.
 
19
                  http://en.wikipedia.org/wiki/Xsd
 
20
                  
 
21
                * to facilitate validation, the location of the schema is
 
22
                  specified in the root element. Such a specification is
 
23
                  done using the schema language snippet xsi:schemaLocation
 
24
                  
 
25
                * by convention, root elements of nexml fragments are 
 
26
                  pre-fixed with 'nex', which is bound to the namespace
 
27
                  http://www.nexml.org/1.0
 
28
                        
 
29
                * the optional 'generator' attribute can be used to specify
 
30
                  which program wrote out the file.
 
31
                  
 
32
                * other xml namespaces (i.e. attributes with the 'xmlns'
 
33
                  prefix) can be specified here, in case they're used 
 
34
                  in child elements. For example, the xlink namespace
 
35
                  is used for links ('href' attributes, as in html), so
 
36
                  that child elements may contain links to other resources.
 
37
                  http://en.wikipedia.org/wiki/XLink
 
38
-->
 
39
<nex:nexml 
 
40
        version="0.9"
 
41
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 
42
        generator="mesquite"
 
43
        xmlns:xlink="http://www.w3.org/1999/xlink"
 
44
        xmlns:nex="http://www.nexml.org/2009"
 
45
        xmlns="http://www.nexml.org/2009"
 
46
        xsi:schemaLocation="http://www.nexml.org/2009 ../xsd/nexml.xsd">
 
47
        <!--
 
48
                The taxa element is analogous to the taxa block in nexus
 
49
                files. Like all elements that capture things that might
 
50
                need to be referred to elsewhere, it requires an 'id'
 
51
                attribute, whose value must consist of a string of alpha-
 
52
                numeric characters, starting with a letter. In addition,
 
53
                it may (optionally) have the following attributes:
 
54
                        * 'label', a free form string, only meant for humans
 
55
                        * 'xml:base', indicating the base url of the resource
 
56
                        * 'xml:lang', indicating a two-letter language code
 
57
                        * 'xml:id', a file-scope unique ID
 
58
                        * 'xlink:href', a link to somewhere else
 
59
                        * 'class', a vector of nexml id references pointing
 
60
                          to classes the element belongs to (this is analogous
 
61
                          to 'sets' in nexus, but using the xml idiom to do
 
62
                          the same thing).
 
63
        -->
 
64
        <otus 
 
65
                id="taxa1" 
 
66
                label="My taxa block" 
 
67
                xml:base="http://example.org/" 
 
68
                xml:id="taxa1" 
 
69
                xml:lang="EN" 
 
70
                xlink:href="#taxa1">
 
71
                <!--  
 
72
                        The taxon element is analogous to a single label in 
 
73
                        a nexus taxa block. It may have the same additional
 
74
                        attributes (label, xml:base, xml:lang, xml:id, xlink:href
 
75
                        and class) as the taxa element.
 
76
                -->
 
77
                <otu id="t1"/>
 
78
                <otu id="t2"/>
 
79
                <otu id="t3"/>
 
80
                <otu id="t4"/>
 
81
                <otu id="t5"/>
 
82
        </otus>
 
83
</nex:nexml>