Skip to content

Commit cbedfd9

Browse files
committed
Enhance the XML schema with metadata FIXTradingCommunity#120
1 parent 3eb75af commit cbedfd9

File tree

7 files changed

+590
-17
lines changed

7 files changed

+590
-17
lines changed

v2-0-RC3/doc/01Introduction.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,9 @@ Representation of dates and times
189189
8-bit single-byte coded graphic character sets -- Part 1: Latin alphabet No. 1
190190

191191
[ISO 10383:2012](http://www.iso.org/iso/home/store/catalogue_tc/catalogue_detail.htm?csnumber=61067)
192-
Securities and related financial instruments - Codes for exchanges and
193-
market identification (MIC)
192+
Securities and related financial instruments - Codes for exchanges and market identification (MIC)
193+
194+
[ISO 15836-1:2017](https://www.iso.org/standard/71339.html) Information and documentation — The Dublin Core metadata element set — Part 1: Core elements
194195

195196
*W3C XML Schema version 1.0* [Part 1](https://www.w3.org/TR/xmlschema-1/) [Part 2](https://www.w3.org/TR/xmlschema-2/)
196197

v2-0-RC3/doc/04MessageSchema.md

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -73,15 +73,23 @@ their encodings.
7373

7474
### Schema versioning
7575

76-
Changes to a message schema may be tracked by its `version` attribute. A
77-
version of a schema is a snapshot in time. All elements in a given
78-
generation of the schema share the same version number. That is,
79-
elements are not versioned individually. By convention, the initial
80-
version of a schema is version zero, and subsequent changes increment
81-
the version number.
82-
83-
The `package` attribute should remain constant between versions, if it is
84-
supplied.
76+
Changes to a message schema may be tracked by its `version` attribute. A version of a schema is a snapshot in time. All elements in a given generation of the schema share the same version number. That is, elements are not versioned individually. By convention, the initial version of a schema is version zero, and subsequent changes increment the version number.
77+
78+
The `package` attribute should remain constant between versions, if it is supplied.
79+
80+
### Metadata
81+
82+
Optionally, an SBE message schema may be identified and described using industry standard Dublin Core metadata terms. Any of those standard terms may be contained by a `<metadata>` element. The Dublin Core XML schema is imported by the SBE XML schema to support that usage.
83+
84+
Metadata example
85+
```xml
86+
<metadata>
87+
<dcterms:publisher>FIX Trading Community</dcterms:publisher>
88+
<dcterms:title>SBE example</dcterms:title>
89+
<dcterms:rights>© Copyright 2014-2020 FIX Protocol Limited</dcterms:rights>
90+
<dcterms:created>2020-06-10T10:07-05:00</dcterms:created>
91+
</metadata>
92+
```
8593

8694
Data encodings
8795
------------------------------------------------------------------------------------------------------------

v2-0-RC3/resources/xml/examples.xml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2-
<messageSchema xmlns="http://fixprotocol.io/2017/sbe" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xi="http://www.w3.org/2001/XInclude" package="examples" id="91" version="0" byteOrder="littleEndian" xsi:schemaLocation="http://fixprotocol.io/2017/sbe ../xsd/sbe-2.0rc3.xsd">
2+
<messageSchema xmlns="http://fixprotocol.io/2017/sbe" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:dcterms="http://purl.org/dc/terms/" package="examples" id="91" version="0" byteOrder="littleEndian" xsi:schemaLocation="http://fixprotocol.io/2017/sbe ../xsd/sbe-2.0rc3.xsd">
3+
<metadata>
4+
<dcterms:publisher>FIX Trading Community</dcterms:publisher>
5+
<dcterms:title>SBE example</dcterms:title>
6+
<dcterms:rights>© Copyright 2014-2020 FIX Protocol Limited</dcterms:rights>
7+
<dcterms:created>2020-06-10T10:07-05:00</dcterms:created>
8+
</metadata>
39
<!-- include commonly used types -->
410
<xi:include href="types-include.xml"/>
511
<types>

v2-0-RC3/resources/xsd/dc.xsd

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
3+
xmlns="http://purl.org/dc/elements/1.1/"
4+
targetNamespace="http://purl.org/dc/elements/1.1/"
5+
elementFormDefault="qualified"
6+
attributeFormDefault="unqualified">
7+
8+
<xs:annotation>
9+
<xs:documentation xml:lang="en">
10+
DCMES 1.1 XML Schema
11+
XML Schema for http://purl.org/dc/elements/1.1/ namespace
12+
13+
Created 2008-02-11
14+
15+
Created by
16+
17+
Tim Cole (t-cole3@uiuc.edu)
18+
Tom Habing (thabing@uiuc.edu)
19+
Jane Hunter (jane@dstc.edu.au)
20+
Pete Johnston (p.johnston@ukoln.ac.uk),
21+
Carl Lagoze (lagoze@cs.cornell.edu)
22+
23+
This schema declares XML elements for the 15 DC elements from the
24+
http://purl.org/dc/elements/1.1/ namespace.
25+
26+
It defines a complexType SimpleLiteral which permits mixed content
27+
and makes the xml:lang attribute available. It disallows child elements by
28+
use of minOcccurs/maxOccurs.
29+
30+
However, this complexType does permit the derivation of other complexTypes
31+
which would permit child elements.
32+
33+
All elements are declared as substitutable for the abstract element any,
34+
which means that the default type for all elements is dc:SimpleLiteral.
35+
36+
</xs:documentation>
37+
38+
</xs:annotation>
39+
40+
41+
<xs:import namespace="http://www.w3.org/XML/1998/namespace"
42+
schemaLocation="http://www.w3.org/2001/03/xml.xsd">
43+
</xs:import>
44+
45+
<xs:complexType name="SimpleLiteral">
46+
<xs:annotation>
47+
<xs:documentation xml:lang="en">
48+
This is the default type for all of the DC elements.
49+
It permits text content only with optional
50+
xml:lang attribute.
51+
Text is allowed because mixed="true", but sub-elements
52+
are disallowed because minOccurs="0" and maxOccurs="0"
53+
are on the xs:any tag.
54+
55+
This complexType allows for restriction or extension permitting
56+
child elements.
57+
</xs:documentation>
58+
</xs:annotation>
59+
60+
<xs:complexContent mixed="true">
61+
<xs:restriction base="xs:anyType">
62+
<xs:sequence>
63+
<xs:any processContents="lax" minOccurs="0" maxOccurs="0"/>
64+
</xs:sequence>
65+
<xs:attribute ref="xml:lang" use="optional"/>
66+
</xs:restriction>
67+
</xs:complexContent>
68+
</xs:complexType>
69+
70+
<xs:element name="any" type="SimpleLiteral" abstract="true"/>
71+
72+
<xs:element name="title" substitutionGroup="any"/>
73+
<xs:element name="creator" substitutionGroup="any"/>
74+
<xs:element name="subject" substitutionGroup="any"/>
75+
<xs:element name="description" substitutionGroup="any"/>
76+
<xs:element name="publisher" substitutionGroup="any"/>
77+
<xs:element name="contributor" substitutionGroup="any"/>
78+
<xs:element name="date" substitutionGroup="any"/>
79+
<xs:element name="type" substitutionGroup="any"/>
80+
<xs:element name="format" substitutionGroup="any"/>
81+
<xs:element name="identifier" substitutionGroup="any"/>
82+
<xs:element name="source" substitutionGroup="any"/>
83+
<xs:element name="language" substitutionGroup="any"/>
84+
<xs:element name="relation" substitutionGroup="any"/>
85+
<xs:element name="coverage" substitutionGroup="any"/>
86+
<xs:element name="rights" substitutionGroup="any"/>
87+
88+
<xs:group name="elementsGroup">
89+
<xs:annotation>
90+
<xs:documentation xml:lang="en">
91+
This group is included as a convenience for schema authors
92+
who need to refer to all the elements in the
93+
http://purl.org/dc/elements/1.1/ namespace.
94+
</xs:documentation>
95+
</xs:annotation>
96+
97+
<xs:sequence>
98+
<xs:choice minOccurs="0" maxOccurs="unbounded">
99+
<xs:element ref="any"/>
100+
</xs:choice>
101+
</xs:sequence>
102+
</xs:group>
103+
104+
<xs:complexType name="elementContainer">
105+
<xs:annotation>
106+
<xs:documentation xml:lang="en">
107+
This complexType is included as a convenience for schema authors who need to define a root
108+
or container element for all of the DC elements.
109+
</xs:documentation>
110+
</xs:annotation>
111+
112+
<xs:choice>
113+
<xs:group ref="elementsGroup"/>
114+
</xs:choice>
115+
</xs:complexType>
116+
117+
118+
</xs:schema>
119+
<!--#include virtual="/schemas/xmls/qdc/2008/02/11/dc.xsd" -->

v2-0-RC3/resources/xsd/dcmitype.xsd

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
3+
xmlns="http://purl.org/dc/dcmitype/"
4+
targetNamespace="http://purl.org/dc/dcmitype/"
5+
elementFormDefault="qualified"
6+
attributeFormDefault="unqualified">
7+
8+
<xs:annotation>
9+
<xs:documentation xml:lang="en">
10+
DCMI Type Vocabulary XML Schema
11+
XML Schema for http://purl.org/dc/dcmitype/ namespace
12+
13+
Created 2008-02-11
14+
15+
Created by
16+
17+
Tim Cole (t-cole3@uiuc.edu)
18+
Tom Habing (thabing@uiuc.edu)
19+
Jane Hunter (jane@dstc.edu.au)
20+
Pete Johnston (p.johnston@ukoln.ac.uk),
21+
Carl Lagoze (lagoze@cs.cornell.edu)
22+
23+
This schema defines a simpleType which enumerates
24+
the allowable values for the DCMI Type Vocabulary.
25+
</xs:documentation>
26+
27+
28+
</xs:annotation>
29+
30+
31+
<xs:simpleType name="DCMIType">
32+
<xs:union>
33+
<xs:simpleType>
34+
<xs:restriction base="xs:Name">
35+
<xs:enumeration value="Collection"/>
36+
<xs:enumeration value="Dataset"/>
37+
<xs:enumeration value="Event"/>
38+
<xs:enumeration value="Image"/>
39+
<xs:enumeration value="MovingImage"/>
40+
<xs:enumeration value="StillImage"/>
41+
<xs:enumeration value="InteractiveResource"/>
42+
<xs:enumeration value="Service"/>
43+
<xs:enumeration value="Software"/>
44+
<xs:enumeration value="Sound"/>
45+
<xs:enumeration value="Text"/>
46+
<xs:enumeration value="PhysicalObject"/>
47+
</xs:restriction>
48+
</xs:simpleType>
49+
</xs:union>
50+
</xs:simpleType>
51+
52+
</xs:schema>
53+
<!--#include virtual="/schemas/xmls/qdc/2008/02/11/dcmitype.xsd" -->

0 commit comments

Comments
 (0)