bio-nexml 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Gemfile +15 -0
- data/Gemfile.lock +24 -0
- data/LICENSE.txt +20 -0
- data/README.rdoc +47 -0
- data/Rakefile +55 -0
- data/TODO.txt +6 -0
- data/VERSION +1 -0
- data/bio-nexml.gemspec +126 -0
- data/extconf.rb +2 -0
- data/lib/bio-nexml.rb +0 -0
- data/lib/bio.rb +321 -0
- data/lib/bio/db/nexml.rb +109 -0
- data/lib/bio/db/nexml/mapper.rb +113 -0
- data/lib/bio/db/nexml/mapper/framework.rb +157 -0
- data/lib/bio/db/nexml/mapper/inflection.rb +99 -0
- data/lib/bio/db/nexml/mapper/repository.rb +59 -0
- data/lib/bio/db/nexml/matrix.rb +1046 -0
- data/lib/bio/db/nexml/parser.rb +622 -0
- data/lib/bio/db/nexml/schema/README.txt +21 -0
- data/lib/bio/db/nexml/schema/abstract.xsd +159 -0
- data/lib/bio/db/nexml/schema/characters/README.txt +1 -0
- data/lib/bio/db/nexml/schema/characters/abstractcharacters.xsd +361 -0
- data/lib/bio/db/nexml/schema/characters/characters.xsd +22 -0
- data/lib/bio/db/nexml/schema/characters/continuous.xsd +190 -0
- data/lib/bio/db/nexml/schema/characters/dna.xsd +282 -0
- data/lib/bio/db/nexml/schema/characters/protein.xsd +280 -0
- data/lib/bio/db/nexml/schema/characters/restriction.xsd +239 -0
- data/lib/bio/db/nexml/schema/characters/rna.xsd +283 -0
- data/lib/bio/db/nexml/schema/characters/standard.xsd +261 -0
- data/lib/bio/db/nexml/schema/external/sawsdl.xsd +21 -0
- data/lib/bio/db/nexml/schema/external/xhtml-datatypes-1.xsd +177 -0
- data/lib/bio/db/nexml/schema/external/xlink.xsd +75 -0
- data/lib/bio/db/nexml/schema/external/xml.xsd +145 -0
- data/lib/bio/db/nexml/schema/meta/README.txt +2 -0
- data/lib/bio/db/nexml/schema/meta/annotations.xsd +100 -0
- data/lib/bio/db/nexml/schema/meta/meta.xsd +294 -0
- data/lib/bio/db/nexml/schema/nexml.xsd +104 -0
- data/lib/bio/db/nexml/schema/taxa/README.txt +2 -0
- data/lib/bio/db/nexml/schema/taxa/taxa.xsd +39 -0
- data/lib/bio/db/nexml/schema/trees/README.txt +2 -0
- data/lib/bio/db/nexml/schema/trees/abstracttrees.xsd +135 -0
- data/lib/bio/db/nexml/schema/trees/network.xsd +113 -0
- data/lib/bio/db/nexml/schema/trees/tree.xsd +149 -0
- data/lib/bio/db/nexml/schema/trees/trees.xsd +36 -0
- data/lib/bio/db/nexml/taxa.rb +147 -0
- data/lib/bio/db/nexml/trees.rb +663 -0
- data/lib/bio/db/nexml/writer.rb +265 -0
- data/test/data/nexml/test.xml +69 -0
- data/test/test_bio-nexml.rb +17 -0
- data/test/unit/bio/db/nexml/tc_factory.rb +119 -0
- data/test/unit/bio/db/nexml/tc_mapper.rb +78 -0
- data/test/unit/bio/db/nexml/tc_matrix.rb +551 -0
- data/test/unit/bio/db/nexml/tc_parser.rb +21 -0
- data/test/unit/bio/db/nexml/tc_taxa.rb +118 -0
- data/test/unit/bio/db/nexml/tc_trees.rb +370 -0
- data/test/unit/bio/db/nexml/tc_writer.rb +633 -0
- metadata +253 -0
@@ -0,0 +1,21 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<xs:schema targetNamespace="http://www.w3.org/ns/sawsdl" xmlns="http://www.w3.org/ns/sawsdl" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://www.w3.org/ns/wsdl">
|
3
|
+
|
4
|
+
<xs:simpleType name="listOfAnyURI">
|
5
|
+
<xs:list itemType="xs:anyURI"/>
|
6
|
+
</xs:simpleType>
|
7
|
+
|
8
|
+
<xs:attribute name="modelReference" type="listOfAnyURI"/>
|
9
|
+
<xs:attribute name="liftingSchemaMapping" type="listOfAnyURI"/>
|
10
|
+
<xs:attribute name="loweringSchemaMapping" type="listOfAnyURI"/>
|
11
|
+
|
12
|
+
<xs:element name="attrExtensions">
|
13
|
+
<xs:complexType>
|
14
|
+
<xs:annotation>
|
15
|
+
<xs:documentation>This element is for use in WSDL 1.1 only. It does not apply to WSDL 2.0 documents. Use in
|
16
|
+
WSDL 2.0 documents is invalid.</xs:documentation>
|
17
|
+
</xs:annotation>
|
18
|
+
<xs:anyAttribute namespace="##any" processContents="lax"/>
|
19
|
+
</xs:complexType>
|
20
|
+
</xs:element>
|
21
|
+
</xs:schema>
|
@@ -0,0 +1,177 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<xs:schema
|
3
|
+
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
4
|
+
xmlns="http://www.w3.org/1999/xhtml/datatypes/"
|
5
|
+
xmlns:xh11d="http://www.w3.org/1999/xhtml/datatypes/"
|
6
|
+
targetNamespace="http://www.w3.org/1999/xhtml/datatypes/"
|
7
|
+
elementFormDefault="qualified"
|
8
|
+
>
|
9
|
+
<xs:annotation>
|
10
|
+
<xs:documentation>
|
11
|
+
XHTML Datatypes
|
12
|
+
This is the XML Schema datatypes module for XHTML
|
13
|
+
|
14
|
+
Defines containers for the XHTML datatypes, many of
|
15
|
+
these imported from other specifications and standards.
|
16
|
+
|
17
|
+
$Id: xhtml-datatypes-1.xsd,v 1.11 2008/10/07 16:57:03 ahby Exp $
|
18
|
+
</xs:documentation>
|
19
|
+
<xs:documentation source="xhtml-copyright-1.xsd"/>
|
20
|
+
<xs:documentation source="http://www.w3.org/TR/2001/REC-xhtml-modularization-20010410/abstraction.html#s_common_attrtypes"/>
|
21
|
+
</xs:annotation>
|
22
|
+
|
23
|
+
<!-- nn for pixels or nn% for percentage length -->
|
24
|
+
<xs:simpleType name="Length">
|
25
|
+
<xs:union memberTypes="xs:nonNegativeInteger">
|
26
|
+
<xs:simpleType>
|
27
|
+
<xs:restriction base="xs:token">
|
28
|
+
<xs:pattern value="\d+[%]|\d*\.\d+[%]"/>
|
29
|
+
</xs:restriction>
|
30
|
+
</xs:simpleType>
|
31
|
+
</xs:union>
|
32
|
+
</xs:simpleType>
|
33
|
+
<!-- space-separated list of link types -->
|
34
|
+
<xs:simpleType name="LinkTypes">
|
35
|
+
<xs:list itemType="xs:NMTOKEN"/>
|
36
|
+
</xs:simpleType>
|
37
|
+
<!-- single or comma-separated list of media descriptors -->
|
38
|
+
<xs:simpleType name="MediaDesc">
|
39
|
+
<xs:restriction base="xs:string"/>
|
40
|
+
</xs:simpleType>
|
41
|
+
<!-- pixel, percentage, or relative -->
|
42
|
+
<xs:simpleType name="MultiLength">
|
43
|
+
<xs:union memberTypes="xh11d:Length">
|
44
|
+
<xs:simpleType>
|
45
|
+
<xs:restriction base="xs:token">
|
46
|
+
<xs:pattern value="\d*\*"/>
|
47
|
+
</xs:restriction>
|
48
|
+
</xs:simpleType>
|
49
|
+
</xs:union>
|
50
|
+
</xs:simpleType>
|
51
|
+
<!-- one or more digits (NUMBER) -->
|
52
|
+
<xs:simpleType name="Number">
|
53
|
+
<xs:restriction base="xs:nonNegativeInteger"/>
|
54
|
+
</xs:simpleType>
|
55
|
+
<!-- integer representing length in pixels -->
|
56
|
+
<xs:simpleType name="Pixels">
|
57
|
+
<xs:restriction base="xs:nonNegativeInteger"/>
|
58
|
+
</xs:simpleType>
|
59
|
+
<!-- script expression -->
|
60
|
+
<xs:simpleType name="Script">
|
61
|
+
<xs:restriction base="xs:string"/>
|
62
|
+
</xs:simpleType>
|
63
|
+
<!-- sixteen color names or RGB color expression-->
|
64
|
+
<xs:simpleType name="Color">
|
65
|
+
<xs:union memberTypes="xs:NMTOKEN">
|
66
|
+
<xs:simpleType>
|
67
|
+
<xs:restriction base="xs:token">
|
68
|
+
<xs:pattern value="#[0-9a-fA-F]{3}([0-9a-fA-F]{3})?"/>
|
69
|
+
</xs:restriction>
|
70
|
+
</xs:simpleType>
|
71
|
+
</xs:union>
|
72
|
+
</xs:simpleType>
|
73
|
+
<!-- textual content -->
|
74
|
+
<xs:simpleType name="Text">
|
75
|
+
<xs:restriction base="xs:string"/>
|
76
|
+
</xs:simpleType>
|
77
|
+
<!-- Imported Datatypes -->
|
78
|
+
<!-- a single character, as per section 2.2 of [XML] -->
|
79
|
+
<xs:simpleType name="Character">
|
80
|
+
<xs:restriction base="xs:string">
|
81
|
+
<xs:length value="1" fixed="true"/>
|
82
|
+
</xs:restriction>
|
83
|
+
</xs:simpleType>
|
84
|
+
<!-- a character encoding, as per [RFC2045] -->
|
85
|
+
<xs:simpleType name="Charset">
|
86
|
+
<xs:restriction base="xs:string"/>
|
87
|
+
</xs:simpleType>
|
88
|
+
<!-- a space separated list of character encodings, as per [RFC2045] -->
|
89
|
+
<xs:simpleType name="Charsets">
|
90
|
+
<xs:list itemType="Charset"/>
|
91
|
+
</xs:simpleType>
|
92
|
+
<!-- media type, as per [RFC2045] -->
|
93
|
+
<xs:simpleType name="ContentType">
|
94
|
+
<xs:restriction base="xs:string"/>
|
95
|
+
</xs:simpleType>
|
96
|
+
<!-- comma-separated list of media types, as per [RFC2045] -->
|
97
|
+
<xs:simpleType name="ContentTypes">
|
98
|
+
<xs:restriction base="xs:string"/>
|
99
|
+
</xs:simpleType>
|
100
|
+
<!-- date and time information. ISO date format -->
|
101
|
+
<xs:simpleType name="Datetime">
|
102
|
+
<xs:restriction base="xs:dateTime"/>
|
103
|
+
</xs:simpleType>
|
104
|
+
<!-- formal public identifier, as per [ISO8879] -->
|
105
|
+
<xs:simpleType name="FPI">
|
106
|
+
<xs:restriction base="xs:normalizedString"/>
|
107
|
+
</xs:simpleType>
|
108
|
+
|
109
|
+
<!-- a window name as used in the target attribute -->
|
110
|
+
<xs:simpleType name="FrameTarget">
|
111
|
+
<xs:union>
|
112
|
+
<xs:simpleType>
|
113
|
+
<xs:restriction base="xs:NMTOKEN">
|
114
|
+
<xs:enumeration value="_blank"/>
|
115
|
+
<xs:enumeration value="_self"/>
|
116
|
+
<xs:enumeration value="_parent"/>
|
117
|
+
<xs:enumeration value="_top"/>
|
118
|
+
</xs:restriction>
|
119
|
+
</xs:simpleType>
|
120
|
+
<xs:simpleType>
|
121
|
+
<xs:restriction base="xs:string">
|
122
|
+
<xs:pattern value="[a-zA-Z].*"/>
|
123
|
+
</xs:restriction>
|
124
|
+
</xs:simpleType>
|
125
|
+
</xs:union>
|
126
|
+
</xs:simpleType>
|
127
|
+
|
128
|
+
<!-- a language code, as per [RFC3066] -->
|
129
|
+
<xs:simpleType name="LanguageCode">
|
130
|
+
<xs:restriction base="xs:language"/>
|
131
|
+
</xs:simpleType>
|
132
|
+
<!-- a comma separated list of language ranges -->
|
133
|
+
<xs:simpleType name="LanguageCodes">
|
134
|
+
<xs:restriction base="xs:string"/>
|
135
|
+
</xs:simpleType>
|
136
|
+
<!-- a Uniform Resource Identifier, see [URI] -->
|
137
|
+
<xs:simpleType name="URI">
|
138
|
+
<xs:restriction base="xs:anyURI"/>
|
139
|
+
</xs:simpleType>
|
140
|
+
<!-- a space-separated list of Uniform Resource Identifiers, see [URI] -->
|
141
|
+
<xs:simpleType name="URIs">
|
142
|
+
<xs:list itemType="xs:anyURI"/>
|
143
|
+
</xs:simpleType>
|
144
|
+
<!-- comma-separated list of MultiLength -->
|
145
|
+
<xs:simpleType name="MultiLengths">
|
146
|
+
<xs:restriction base="xs:string"/>
|
147
|
+
</xs:simpleType>
|
148
|
+
<!-- character Data -->
|
149
|
+
<xs:simpleType name="CDATA">
|
150
|
+
<xs:restriction base="xs:string"/>
|
151
|
+
</xs:simpleType>
|
152
|
+
<!-- CURIE placeholder datatypes -->
|
153
|
+
<xs:simpleType name="CURIE">
|
154
|
+
<xs:restriction base="xs:string">
|
155
|
+
<xs:pattern value="(([\i-[:]][\c-[:]]*)?:)?.+" />
|
156
|
+
<xs:minLength value="1"/>
|
157
|
+
</xs:restriction>
|
158
|
+
</xs:simpleType>
|
159
|
+
<xs:simpleType name="CURIEs">
|
160
|
+
<xs:list itemType="xh11d:CURIE"/>
|
161
|
+
</xs:simpleType>
|
162
|
+
<xs:simpleType name="SafeCURIE">
|
163
|
+
<xs:restriction base="xs:string">
|
164
|
+
<xs:pattern value="\[(([\i-[:]][\c-[:]]*)?:)?.+\]" />
|
165
|
+
<xs:minLength value="3"/>
|
166
|
+
</xs:restriction>
|
167
|
+
</xs:simpleType>
|
168
|
+
<xs:simpleType name="SafeCURIEs">
|
169
|
+
<xs:list itemType="xh11d:SafeCURIE"/>
|
170
|
+
</xs:simpleType>
|
171
|
+
<xs:simpleType name="URIorSafeCURIE">
|
172
|
+
<xs:union memberTypes="xs:anyURI xh11d:SafeCURIE" />
|
173
|
+
</xs:simpleType>
|
174
|
+
<xs:simpleType name="URIorSafeCURIEs">
|
175
|
+
<xs:list itemType="xh11d:URIorSafeCURIE"/>
|
176
|
+
</xs:simpleType>
|
177
|
+
</xs:schema>
|
@@ -0,0 +1,75 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<!-- METS XLink Schema, v. 2, Nov. 15, 2004 -->
|
3
|
+
<schema targetNamespace="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:xlink="http://www.w3.org/1999/xlink" elementFormDefault="qualified">
|
4
|
+
<!-- global attributes -->
|
5
|
+
<attribute name="href" type="anyURI"/>
|
6
|
+
<attribute name="role" type="string"/>
|
7
|
+
<attribute name="arcrole" type="string"/>
|
8
|
+
<attribute name="title" type="string" />
|
9
|
+
<attribute name="show">
|
10
|
+
<simpleType>
|
11
|
+
<restriction base="string">
|
12
|
+
<enumeration value="new" />
|
13
|
+
<enumeration value="replace" />
|
14
|
+
<enumeration value="embed" />
|
15
|
+
<enumeration value="other" />
|
16
|
+
<enumeration value="none" />
|
17
|
+
</restriction>
|
18
|
+
</simpleType>
|
19
|
+
</attribute>
|
20
|
+
<attribute name="actuate">
|
21
|
+
<simpleType>
|
22
|
+
<restriction base="string">
|
23
|
+
<enumeration value="onLoad" />
|
24
|
+
<enumeration value="onRequest" />
|
25
|
+
<enumeration value="other" />
|
26
|
+
<enumeration value="none" />
|
27
|
+
</restriction>
|
28
|
+
</simpleType>
|
29
|
+
</attribute>
|
30
|
+
<attribute name="label" type="string" />
|
31
|
+
<attribute name="from" type="string" />
|
32
|
+
<attribute name="to" type="string" />
|
33
|
+
<attributeGroup name="simpleLink">
|
34
|
+
<attribute name="type" type="string" fixed="simple" form="qualified" />
|
35
|
+
<attribute ref="xlink:href" use="optional" />
|
36
|
+
<attribute ref="xlink:role" use="optional" />
|
37
|
+
<attribute ref="xlink:arcrole" use="optional" />
|
38
|
+
<attribute ref="xlink:title" use="optional" />
|
39
|
+
<attribute ref="xlink:show" use="optional" />
|
40
|
+
<attribute ref="xlink:actuate" use="optional" />
|
41
|
+
</attributeGroup>
|
42
|
+
<attributeGroup name="extendedLink">
|
43
|
+
<attribute name="type" type="string" fixed="extended" form="qualified" />
|
44
|
+
<attribute ref="xlink:role" use="optional" />
|
45
|
+
<attribute ref="xlink:title" use="optional" />
|
46
|
+
</attributeGroup>
|
47
|
+
<attributeGroup name="locatorLink">
|
48
|
+
<attribute name="type" type="string" fixed="locator" form="qualified" />
|
49
|
+
<attribute ref="xlink:href" use="required" />
|
50
|
+
<attribute ref="xlink:role" use="optional" />
|
51
|
+
<attribute ref="xlink:title" use="optional" />
|
52
|
+
<attribute ref="xlink:label" use="optional" />
|
53
|
+
</attributeGroup>
|
54
|
+
<attributeGroup name="arcLink">
|
55
|
+
<attribute name="type" type="string" fixed="arc" form="qualified" />
|
56
|
+
<attribute ref="xlink:arcrole" use="optional" />
|
57
|
+
<attribute ref="xlink:title" use="optional" />
|
58
|
+
<attribute ref="xlink:show" use="optional" />
|
59
|
+
<attribute ref="xlink:actuate" use="optional" />
|
60
|
+
<attribute ref="xlink:from" use="optional" />
|
61
|
+
<attribute ref="xlink:to" use="optional" />
|
62
|
+
</attributeGroup>
|
63
|
+
<attributeGroup name="resourceLink">
|
64
|
+
<attribute name="type" type="string" fixed="resource" form="qualified" />
|
65
|
+
<attribute ref="xlink:role" use="optional" />
|
66
|
+
<attribute ref="xlink:title" use="optional" />
|
67
|
+
<attribute ref="xlink:label" use="optional" />
|
68
|
+
</attributeGroup>
|
69
|
+
<attributeGroup name="titleLink">
|
70
|
+
<attribute name="type" type="string" fixed="title" form="qualified" />
|
71
|
+
</attributeGroup>
|
72
|
+
<attributeGroup name="emptyLink">
|
73
|
+
<attribute name="type" type="string" fixed="none" form="qualified" />
|
74
|
+
</attributeGroup>
|
75
|
+
</schema>
|
@@ -0,0 +1,145 @@
|
|
1
|
+
<?xml version="1.0"?>
|
2
|
+
<xs:schema targetNamespace="http://www.w3.org/XML/1998/namespace" xmlns:xs="http://www.w3.org/2001/XMLSchema" xml:lang="en">
|
3
|
+
|
4
|
+
<xs:annotation>
|
5
|
+
<xs:documentation>
|
6
|
+
See http://www.w3.org/XML/1998/namespace.html and
|
7
|
+
http://www.w3.org/TR/REC-xml for information about this namespace.
|
8
|
+
|
9
|
+
This schema document describes the XML namespace, in a form
|
10
|
+
suitable for import by other schema documents.
|
11
|
+
|
12
|
+
Note that local names in this namespace are intended to be defined
|
13
|
+
only by the World Wide Web Consortium or its subgroups. The
|
14
|
+
following names are currently defined in this namespace and should
|
15
|
+
not be used with conflicting semantics by any Working Group,
|
16
|
+
specification, or document instance:
|
17
|
+
|
18
|
+
base (as an attribute name): denotes an attribute whose value
|
19
|
+
provides a URI to be used as the base for interpreting any
|
20
|
+
relative URIs in the scope of the element on which it
|
21
|
+
appears; its value is inherited. This name is reserved
|
22
|
+
by virtue of its definition in the XML Base specification.
|
23
|
+
|
24
|
+
id (as an attribute name): denotes an attribute whose value
|
25
|
+
should be interpreted as if declared to be of type ID.
|
26
|
+
This name is reserved by virtue of its definition in the
|
27
|
+
xml:id specification.
|
28
|
+
|
29
|
+
lang (as an attribute name): denotes an attribute whose value
|
30
|
+
is a language code for the natural language of the content of
|
31
|
+
any element; its value is inherited. This name is reserved
|
32
|
+
by virtue of its definition in the XML specification.
|
33
|
+
|
34
|
+
space (as an attribute name): denotes an attribute whose
|
35
|
+
value is a keyword indicating what whitespace processing
|
36
|
+
discipline is intended for the content of the element; its
|
37
|
+
value is inherited. This name is reserved by virtue of its
|
38
|
+
definition in the XML specification.
|
39
|
+
|
40
|
+
Father (in any context at all): denotes Jon Bosak, the chair of
|
41
|
+
the original XML Working Group. This name is reserved by
|
42
|
+
the following decision of the W3C XML Plenary and
|
43
|
+
XML Coordination groups:
|
44
|
+
|
45
|
+
In appreciation for his vision, leadership and dedication
|
46
|
+
the W3C XML Plenary on this 10th day of February, 2000
|
47
|
+
reserves for Jon Bosak in perpetuity the XML name
|
48
|
+
xml:Father
|
49
|
+
</xs:documentation>
|
50
|
+
</xs:annotation>
|
51
|
+
|
52
|
+
<xs:annotation>
|
53
|
+
<xs:documentation>This schema defines attributes and an attribute group
|
54
|
+
suitable for use by
|
55
|
+
schemas wishing to allow xml:base, xml:lang, xml:space or xml:id
|
56
|
+
attributes on elements they define.
|
57
|
+
|
58
|
+
To enable this, such a schema must import this schema
|
59
|
+
for the XML namespace, e.g. as follows:
|
60
|
+
<schema . . .>
|
61
|
+
. . .
|
62
|
+
<import namespace="http://www.w3.org/XML/1998/namespace"
|
63
|
+
schemaLocation="http://www.w3.org/2001/xml.xsd"/>
|
64
|
+
|
65
|
+
Subsequently, qualified reference to any of the attributes
|
66
|
+
or the group defined below will have the desired effect, e.g.
|
67
|
+
|
68
|
+
<type . . .>
|
69
|
+
. . .
|
70
|
+
<attributeGroup ref="xml:specialAttrs"/>
|
71
|
+
|
72
|
+
will define a type which will schema-validate an instance
|
73
|
+
element with any of those attributes</xs:documentation>
|
74
|
+
</xs:annotation>
|
75
|
+
|
76
|
+
<xs:annotation>
|
77
|
+
<xs:documentation>In keeping with the XML Schema WG's standard versioning
|
78
|
+
policy, this schema document will persist at
|
79
|
+
http://www.w3.org/2007/08/xml.xsd.
|
80
|
+
At the date of issue it can also be found at
|
81
|
+
http://www.w3.org/2001/xml.xsd.
|
82
|
+
The schema document at that URI may however change in the future,
|
83
|
+
in order to remain compatible with the latest version of XML Schema
|
84
|
+
itself, or with the XML namespace itself. In other words, if the XML
|
85
|
+
Schema or XML namespaces change, the version of this document at
|
86
|
+
http://www.w3.org/2001/xml.xsd will change
|
87
|
+
accordingly; the version at
|
88
|
+
http://www.w3.org/2007/08/xml.xsd will not change.
|
89
|
+
</xs:documentation>
|
90
|
+
</xs:annotation>
|
91
|
+
|
92
|
+
<xs:attribute name="lang">
|
93
|
+
<xs:annotation>
|
94
|
+
<xs:documentation>Attempting to install the relevant ISO 2- and 3-letter
|
95
|
+
codes as the enumerated possible values is probably never
|
96
|
+
going to be a realistic possibility. See
|
97
|
+
RFC 3066 at http://www.ietf.org/rfc/rfc3066.txt and the IANA registry
|
98
|
+
at http://www.iana.org/assignments/lang-tag-apps.htm for
|
99
|
+
further information.
|
100
|
+
|
101
|
+
The union allows for the 'un-declaration' of xml:lang with
|
102
|
+
the empty string.</xs:documentation>
|
103
|
+
</xs:annotation>
|
104
|
+
<xs:simpleType>
|
105
|
+
<xs:union memberTypes="xs:language">
|
106
|
+
<xs:simpleType>
|
107
|
+
<xs:restriction base="xs:string">
|
108
|
+
<xs:enumeration value=""/>
|
109
|
+
</xs:restriction>
|
110
|
+
</xs:simpleType>
|
111
|
+
</xs:union>
|
112
|
+
</xs:simpleType>
|
113
|
+
</xs:attribute>
|
114
|
+
|
115
|
+
<xs:attribute name="space">
|
116
|
+
<xs:simpleType>
|
117
|
+
<xs:restriction base="xs:NCName">
|
118
|
+
<xs:enumeration value="default"/>
|
119
|
+
<xs:enumeration value="preserve"/>
|
120
|
+
</xs:restriction>
|
121
|
+
</xs:simpleType>
|
122
|
+
</xs:attribute>
|
123
|
+
|
124
|
+
<xs:attribute name="base" type="xs:anyURI">
|
125
|
+
<xs:annotation>
|
126
|
+
<xs:documentation>See http://www.w3.org/TR/xmlbase/ for
|
127
|
+
information about this attribute.</xs:documentation>
|
128
|
+
</xs:annotation>
|
129
|
+
</xs:attribute>
|
130
|
+
|
131
|
+
<xs:attribute name="id" type="xs:ID">
|
132
|
+
<xs:annotation>
|
133
|
+
<xs:documentation>See http://www.w3.org/TR/xml-id/ for
|
134
|
+
information about this attribute.</xs:documentation>
|
135
|
+
</xs:annotation>
|
136
|
+
</xs:attribute>
|
137
|
+
|
138
|
+
<xs:attributeGroup name="specialAttrs">
|
139
|
+
<xs:attribute ref="xml:base"/>
|
140
|
+
<xs:attribute ref="xml:lang"/>
|
141
|
+
<xs:attribute ref="xml:space"/>
|
142
|
+
<xs:attribute ref="xml:id"/>
|
143
|
+
</xs:attributeGroup>
|
144
|
+
|
145
|
+
</xs:schema>
|
@@ -0,0 +1,100 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.nexml.org/2009"
|
3
|
+
xmlns:xml="http://www.w3.org/XML/1998/namespace" xmlns="http://www.nexml.org/2009"
|
4
|
+
xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sawsdl="http://www.w3.org/ns/sawsdl"
|
5
|
+
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
6
|
+
xmlns:xhtml="http://www.w3.org/1999/xhtml/datatypes/" elementFormDefault="qualified">
|
7
|
+
|
8
|
+
<!-- <xs:annotation>
|
9
|
+
<xs:documentation>
|
10
|
+
This module defines annotations that can be attached to
|
11
|
+
(almost) any nexml element. The markup for these annotations
|
12
|
+
allows embedding of RDFa-compliant metadata.
|
13
|
+
</xs:documentation>
|
14
|
+
</xs:annotation>
|
15
|
+
-->
|
16
|
+
<xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="../external/xml.xsd"/>
|
17
|
+
<xs:import namespace="http://www.w3.org/1999/xlink" schemaLocation="../external/xlink.xsd"/>
|
18
|
+
<xs:import namespace="http://www.w3.org/ns/sawsdl" schemaLocation="../external/sawsdl.xsd"/>
|
19
|
+
<xs:import namespace="http://www.w3.org/1999/xhtml/datatypes/"
|
20
|
+
schemaLocation="../external/xhtml-datatypes-1.xsd"/>
|
21
|
+
|
22
|
+
<xs:complexType name="Base" abstract="true">
|
23
|
+
<xs:annotation>
|
24
|
+
<xs:documentation>
|
25
|
+
The base type for all complexType definitions in the
|
26
|
+
nexml schema. This type allows a number of special
|
27
|
+
attributes:
|
28
|
+
<ul>
|
29
|
+
<li>xml:lang - for languages codes</li>
|
30
|
+
<li>
|
31
|
+
xml:base - see
|
32
|
+
<a href="http://www.w3.org/TR/xmlbase/">
|
33
|
+
http://www.w3.org/TR/xmlbase/
|
34
|
+
</a>
|
35
|
+
</li>
|
36
|
+
<li>
|
37
|
+
xml:id - see
|
38
|
+
<a href="http://www.w3.org/TR/xml-id/">
|
39
|
+
http://www.w3.org/TR/xml-id/
|
40
|
+
</a>
|
41
|
+
</li>
|
42
|
+
<li>xml:space - for whitespace handling</li>
|
43
|
+
<li>xlink:href - for links</li>
|
44
|
+
<li>class - for class membership</li>
|
45
|
+
</ul>
|
46
|
+
Also see http://www.w3.org/2001/xml.xsd for more
|
47
|
+
information on the xml and xlink attributes.
|
48
|
+
</xs:documentation>
|
49
|
+
</xs:annotation>
|
50
|
+
<xs:sequence/>
|
51
|
+
<!-- <xs:attributeGroup ref="xml:specialAttrs" /> -->
|
52
|
+
<xs:attribute name="class" type="xs:IDREFS" use="optional"/>
|
53
|
+
<xs:attribute name="id" type="xs:ID" use="optional"/>
|
54
|
+
<xs:anyAttribute namespace="##any" processContents="skip"/>
|
55
|
+
</xs:complexType>
|
56
|
+
|
57
|
+
<xs:complexType name="Meta" abstract="true" mixed="true">
|
58
|
+
<xs:complexContent>
|
59
|
+
<xs:extension base="Base"> </xs:extension>
|
60
|
+
</xs:complexContent>
|
61
|
+
</xs:complexType>
|
62
|
+
|
63
|
+
<xs:complexType name="ResourceMeta" abstract="false" mixed="true">
|
64
|
+
<xs:annotation>
|
65
|
+
<xs:documentation>
|
66
|
+
Metadata annotations in which the object is a resource. If this element contains meta elements
|
67
|
+
as children, then the object of this annotation is a "blank node".
|
68
|
+
</xs:documentation>
|
69
|
+
</xs:annotation>
|
70
|
+
<xs:complexContent>
|
71
|
+
<xs:extension base="Meta">
|
72
|
+
<xs:sequence>
|
73
|
+
<xs:element name="meta" type="Meta" minOccurs="0" maxOccurs="unbounded"/>
|
74
|
+
</xs:sequence>
|
75
|
+
<xs:attribute name="href" type="xhtml:URI" use="optional"/>
|
76
|
+
<xs:attribute name="rel" type="xs:QName" use="required"/>
|
77
|
+
</xs:extension>
|
78
|
+
</xs:complexContent>
|
79
|
+
</xs:complexType>
|
80
|
+
|
81
|
+
<xs:complexType name="LiteralMeta" mixed="true" abstract="false">
|
82
|
+
<xs:annotation>
|
83
|
+
<xs:documentation>
|
84
|
+
Metadata annotations in which the object is a literal value. If the @content attribute is used,
|
85
|
+
then the element should contain no children.
|
86
|
+
</xs:documentation>
|
87
|
+
</xs:annotation>
|
88
|
+
<xs:complexContent mixed="true">
|
89
|
+
<xs:extension base="Meta">
|
90
|
+
<xs:sequence>
|
91
|
+
<xs:any minOccurs="0" maxOccurs="unbounded"/>
|
92
|
+
</xs:sequence>
|
93
|
+
<xs:attribute name="property" type="xs:QName" use="required"/>
|
94
|
+
<xs:attribute name="datatype" type="xs:QName" use="optional"/>
|
95
|
+
<xs:attribute name="content" type="xs:string"/>
|
96
|
+
</xs:extension>
|
97
|
+
</xs:complexContent>
|
98
|
+
</xs:complexType>
|
99
|
+
|
100
|
+
</xs:schema>
|