diff --git a/v2-0-RC3/doc/05SchemaExtensionMechanism.md b/v2-0-RC3/doc/05SchemaExtensionMechanism.md index 775f27b..01c85e0 100644 --- a/v2-0-RC3/doc/05SchemaExtensionMechanism.md +++ b/v2-0-RC3/doc/05SchemaExtensionMechanism.md @@ -122,13 +122,18 @@ If the *received version is less than the decoder's version* (that is, the produ ## Message schema extension example -Initial version of a message schema +The following example walks through changes to a schema to reinforce how schema +versioning works. +### Initial schema + +Here's the initial example schema: ```xml - - - + + + + @@ -137,7 +142,13 @@ Initial version of a message schema ``` -Second version - a new message is added +### Adding elements to the schema + +Below adds new elements to the schema. Upon any update we must increment the +`version` attribute. When there is no `version` attribute, the version is zero. +Hence, our new version is one. This version applies to all change. + +This update chooses to document updates with the `sinceVersion` attribute. ```xml ``` -Third version - a field is added +### Adding a field to a message + +This update changes a message from the initial schema and adds a type. ```xml ``` + +Notice adding fields does not effect `sinceVersion` on the message that +contains them.