1
<?xml version="1.0" encoding="ISO-8859-1"?>
3
This file is an example of a simple taxa block.
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.
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
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
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
29
* the optional 'generator' attribute can be used to specify
30
which program wrote out the file.
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
41
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
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">
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
67
xml:base="http://example.org/"
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.