From cbedfd9fc1f0d5a48accf4c4e442903f993fbdf6 Mon Sep 17 00:00:00 2001 From: Don Mendelson Date: Wed, 10 Jun 2020 10:29:47 -0500 Subject: [PATCH] Enhance the XML schema with metadata #120 --- v2-0-RC3/doc/01Introduction.md | 5 +- v2-0-RC3/doc/04MessageSchema.md | 26 +- v2-0-RC3/resources/xml/examples.xml | 8 +- v2-0-RC3/resources/xsd/dc.xsd | 119 ++++++++ v2-0-RC3/resources/xsd/dcmitype.xsd | 53 ++++ v2-0-RC3/resources/xsd/dcterms.xsd | 383 ++++++++++++++++++++++++++ v2-0-RC3/resources/xsd/sbe-2.0rc3.xsd | 13 +- 7 files changed, 590 insertions(+), 17 deletions(-) create mode 100644 v2-0-RC3/resources/xsd/dc.xsd create mode 100644 v2-0-RC3/resources/xsd/dcmitype.xsd create mode 100644 v2-0-RC3/resources/xsd/dcterms.xsd diff --git a/v2-0-RC3/doc/01Introduction.md b/v2-0-RC3/doc/01Introduction.md index 3b6fbb3..d25130f 100644 --- a/v2-0-RC3/doc/01Introduction.md +++ b/v2-0-RC3/doc/01Introduction.md @@ -189,8 +189,9 @@ Representation of dates and times 8-bit single-byte coded graphic character sets -- Part 1: Latin alphabet No. 1 [ISO 10383:2012](http://www.iso.org/iso/home/store/catalogue_tc/catalogue_detail.htm?csnumber=61067) -Securities and related financial instruments - Codes for exchanges and -market identification (MIC) +Securities and related financial instruments - Codes for exchanges and market identification (MIC) + +[ISO 15836-1:2017](https://www.iso.org/standard/71339.html) Information and documentation — The Dublin Core metadata element set — Part 1: Core elements *W3C XML Schema version 1.0* [Part 1](https://www.w3.org/TR/xmlschema-1/) [Part 2](https://www.w3.org/TR/xmlschema-2/) diff --git a/v2-0-RC3/doc/04MessageSchema.md b/v2-0-RC3/doc/04MessageSchema.md index 385561e..b420b6d 100644 --- a/v2-0-RC3/doc/04MessageSchema.md +++ b/v2-0-RC3/doc/04MessageSchema.md @@ -73,15 +73,23 @@ their encodings. ### Schema versioning -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. - -The `package` attribute should remain constant between versions, if it is -supplied. +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. + +The `package` attribute should remain constant between versions, if it is supplied. + +### Metadata + +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 `` element. The Dublin Core XML schema is imported by the SBE XML schema to support that usage. + +Metadata example +```xml + + FIX Trading Community + SBE example + © Copyright 2014-2020 FIX Protocol Limited + 2020-06-10T10:07-05:00 + +``` Data encodings ------------------------------------------------------------------------------------------------------------ diff --git a/v2-0-RC3/resources/xml/examples.xml b/v2-0-RC3/resources/xml/examples.xml index 667ded8..2bb72b8 100644 --- a/v2-0-RC3/resources/xml/examples.xml +++ b/v2-0-RC3/resources/xml/examples.xml @@ -1,5 +1,11 @@ - + + + FIX Trading Community + SBE example + © Copyright 2014-2020 FIX Protocol Limited + 2020-06-10T10:07-05:00 + diff --git a/v2-0-RC3/resources/xsd/dc.xsd b/v2-0-RC3/resources/xsd/dc.xsd new file mode 100644 index 0000000..bdd083d --- /dev/null +++ b/v2-0-RC3/resources/xsd/dc.xsd @@ -0,0 +1,119 @@ + + + + + + DCMES 1.1 XML Schema + XML Schema for http://purl.org/dc/elements/1.1/ namespace + + Created 2008-02-11 + + Created by + + Tim Cole (t-cole3@uiuc.edu) + Tom Habing (thabing@uiuc.edu) + Jane Hunter (jane@dstc.edu.au) + Pete Johnston (p.johnston@ukoln.ac.uk), + Carl Lagoze (lagoze@cs.cornell.edu) + + This schema declares XML elements for the 15 DC elements from the + http://purl.org/dc/elements/1.1/ namespace. + + It defines a complexType SimpleLiteral which permits mixed content + and makes the xml:lang attribute available. It disallows child elements by + use of minOcccurs/maxOccurs. + + However, this complexType does permit the derivation of other complexTypes + which would permit child elements. + + All elements are declared as substitutable for the abstract element any, + which means that the default type for all elements is dc:SimpleLiteral. + + + + + + + + + + + + + This is the default type for all of the DC elements. + It permits text content only with optional + xml:lang attribute. + Text is allowed because mixed="true", but sub-elements + are disallowed because minOccurs="0" and maxOccurs="0" + are on the xs:any tag. + + This complexType allows for restriction or extension permitting + child elements. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This group is included as a convenience for schema authors + who need to refer to all the elements in the + http://purl.org/dc/elements/1.1/ namespace. + + + + + + + + + + + + + + This complexType is included as a convenience for schema authors who need to define a root + or container element for all of the DC elements. + + + + + + + + + + + \ No newline at end of file diff --git a/v2-0-RC3/resources/xsd/dcmitype.xsd b/v2-0-RC3/resources/xsd/dcmitype.xsd new file mode 100644 index 0000000..9a9f046 --- /dev/null +++ b/v2-0-RC3/resources/xsd/dcmitype.xsd @@ -0,0 +1,53 @@ + + + + + + DCMI Type Vocabulary XML Schema + XML Schema for http://purl.org/dc/dcmitype/ namespace + + Created 2008-02-11 + + Created by + + Tim Cole (t-cole3@uiuc.edu) + Tom Habing (thabing@uiuc.edu) + Jane Hunter (jane@dstc.edu.au) + Pete Johnston (p.johnston@ukoln.ac.uk), + Carl Lagoze (lagoze@cs.cornell.edu) + + This schema defines a simpleType which enumerates + the allowable values for the DCMI Type Vocabulary. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/v2-0-RC3/resources/xsd/dcterms.xsd b/v2-0-RC3/resources/xsd/dcterms.xsd new file mode 100644 index 0000000..7f6f1c7 --- /dev/null +++ b/v2-0-RC3/resources/xsd/dcterms.xsd @@ -0,0 +1,383 @@ + + + + + + DCterms XML Schema + XML Schema for http://purl.org/dc/terms/ namespace + + Created 2008-02-11 + + Created by + + Tim Cole (t-cole3@uiuc.edu) + Tom Habing (thabing@uiuc.edu) + Jane Hunter (jane@dstc.edu.au) + Pete Johnston (p.johnston@ukoln.ac.uk), + Carl Lagoze (lagoze@cs.cornell.edu) + + This schema declares XML elements for the DC elements and + DC element refinements from the http://purl.org/dc/terms/ namespace. + + It reuses the complexType dc:SimpleLiteral, imported from the dc.xsd + schema, which permits simple element content, and makes the xml:lang + attribute available. + + This complexType permits the derivation of other complexTypes + which would permit child elements. + + XML elements corresponding to DC elements are declared as substitutable for the abstract element dc:any, and + XML elements corresponding to DC element refinements are defined as substitutable for the base elements + which they refine. + + This means that the default type for all XML elements (i.e. corresponding to all DC elements and + element refinements) is dc:SimpleLiteral. + + Encoding schemes are defined as complexTypes which are restrictions + of the dc:SimpleLiteral complexType. These complexTypes restrict + values to an appropriates syntax or format using data typing, + regular expressions, or enumerated lists. + + In order to specify one of these encodings an xsi:type attribute must + be used in the instance document. + + Also, note that one shortcoming of this approach is that any type can be + applied to any of the elements or refinements. There is no convenient way + to restrict types to specific elements using this approach. + + Changes in 2008-02-11 version: + + Add element declarations corresponding to 15 new dcterms URIs, and amend use of substitutionGroups. + + Add compexType definitions corresponding to ISO639-3, RFC4646. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This group is included as a convenience for schema authors + who need to refer to all the DC elements and element refinements + in the http://purl.org/dc/elements/1.1/ and + http://purl.org/dc/terms namespaces. + N.B. Refinements available via substitution groups. + + + + + + + + + + + + + + This is included as a convenience for schema authors who need to define a root + or container element for all of the DC elements and element refinements. + + + + + + + + + + + diff --git a/v2-0-RC3/resources/xsd/sbe-2.0rc3.xsd b/v2-0-RC3/resources/xsd/sbe-2.0rc3.xsd index e02cf7e..db3e62d 100644 --- a/v2-0-RC3/resources/xsd/sbe-2.0rc3.xsd +++ b/v2-0-RC3/resources/xsd/sbe-2.0rc3.xsd @@ -1,15 +1,17 @@ - + Message schema for FIX Simple Binary Encoding *Namespace is tentative.* - Version: 2.0 RC2 - © Copyright 2014-2019 FIX Protocol Limited + Version: 2.0 RC3 + © Copyright 2014-2020 FIX Protocol Limited License: Creative Commons Attribution-NoDerivatives 4.0 International Public License + + @@ -20,6 +22,7 @@ + @@ -81,8 +84,8 @@ Overrides the messageSchema package - + @@ -107,8 +110,8 @@ Overrides the messageSchema package - +