<?xml version="1.0" encoding="UTF-8"?>
<metanorma xmlns="https://www.metanorma.org/ns/standoc" type="semantic" version="2.8.6" schema-version="v2.1.6" flavor="ribose">
<bibdata type="standard">
<title language="en" type="main">Metanorma document revision format specification</title>
<docidentifier primary="true" type="Ribose">113</docidentifier><docnumber>113</docnumber><date type="updated"><on>2025-03-05</on></date><contributor><role type="author"/><organization>
<name>Ribose Asia Limited</name>
<abbreviation>Ribose</abbreviation></organization></contributor><contributor><role type="publisher"/><organization>
<name>Ribose Asia Limited</name>
<abbreviation>Ribose</abbreviation></organization></contributor><edition>1</edition><version>2025-03-05</version><language>en</language><script>Latn</script><status><stage>draft</stage></status><copyright><from>2025</from><owner><organization>
<name>Ribose Asia Limited</name>
<abbreviation>Ribose</abbreviation></organization></owner></copyright><ext><doctype>standard</doctype><flavor>ribose</flavor></ext></bibdata><metanorma-extension><semantic-metadata><stage-published>false</stage-published></semantic-metadata>
<presentation-metadata><toc-heading-levels>2</toc-heading-levels><html-toc-heading-levels>2</html-toc-heading-levels><doc-toc-heading-levels>2</doc-toc-heading-levels><pdf-toc-heading-levels>2</pdf-toc-heading-levels></presentation-metadata></metanorma-extension>
<boilerplate><copyright-statement>

<clause id="_e7df828a-3e38-a44b-e1d3-06eee96b9b34" obligation="normative"><p id="_ec0ed287-9c00-c6cb-c0ed-f7e8883a816e">© Ribose Asia Limited 2025</p>
</clause>
</copyright-statement>

<license-statement>

<clause id="_3179d22c-816d-e694-6037-341f744bc6dc" obligation="normative">
<title id="_5ad8fb30-fcae-1072-87a2-407e6b4939ec">Warning for Drafts</title>
<p id="_a24807ee-0381-7ef8-1167-c3aacbb0fd73">This document is not a Ribose Standard. It is distributed for review and comment, and is subject to change without notice and may not be referred to as a Standard. Recipients of this draft are invited to submit, with their comments, notification of any relevant patent rights of which they are aware and to provide supporting documentation.</p>
</clause>
</license-statement>

<legal-statement>

<clause id="_7e0f3c63-3fc9-65cf-37f7-b94afa0dbc5d" obligation="normative"><p id="_50bbfa02-61c3-8332-bad8-61e7389d1808">All rights reserved. Unless otherwise specified, no part of this publication may be reproduced or utilized otherwise in any form or by any means, electronic or mechanical, including photocopying, or posting on the internet or an intranet, without prior written permission. Permission can be requested from the address below.</p>
</clause>
</legal-statement>

<feedback-statement>

<clause id="_d43a5e83-e752-e9bc-955e-4282a8ebb43a" obligation="normative"><p id="_0145a561-c9cc-a509-4784-ac2a1e6ea922" anchor="boilerplate-name" align="left">Ribose Asia Limited</p>

<p id="_80954cc8-1f49-9d20-5987-829595995a92" anchor="boilerplate-address" align="left">Suite 1, 8/F, New Henry House<br/> 10 Ice House Street<br/> Central<br/> Hong Kong<br/> <br/> <link target="mailto:copyright@ribose.com"/><br/> <link target="https://www.ribose.com">www.ribose.com</link></p>
</clause>
</feedback-statement>
</boilerplate><preface><introduction id="_6c90281e-5d56-8fc5-b209-e10bc840e638" anchor="introduction" obligation="informative">
<title id="_2b2e98d1-114a-3da4-8556-01ae0a724280">Introduction</title>
<p id="_54e5b9ca-8a4e-151e-5d20-02debdb52d19">This specification defines the Metanorma document revision format, a structured data format for tracking and documenting changes to technical documents across multiple revisions and editions.</p>

<p id="_cef4b5c4-9696-db0b-1258-a16a267ccff1">Document revision history is a critical component of standards development and technical documentation, providing transparency and traceability for changes over time. A well-structured revision history enables:</p>

<ul id="_8dc7b325-be00-4fd2-232b-7252c5932755"><li><p id="_4e9659ab-13de-aabe-a27e-b82f3b4cebd2">Clear documentation of when and why changes were made</p>
</li>
<li><p id="_f75955b4-b21d-eb93-26e3-89f37a260071">Attribution of changes to specific contributors or organizations</p>
</li>
<li><p id="_ae09ddd3-08cf-104c-4784-da1010ea4845">Precise identification of affected document sections or components</p>
</li>
<li><p id="_9ef6cc62-eeaa-af56-17d7-694d66519d7d">Classification of changes by type, severity, or other attributes</p>
</li>
<li><p id="_e0fc0d69-8da4-2cba-e384-356a5f164a05">Consistent presentation of revision information across different output formats</p>
</li>
</ul>

<p id="_b8d0cf29-109e-6e97-f750-467cb589aefa">The Metanorma document revision format addresses these needs with:</p>

<ol id="_8119db79-36c9-dab4-9890-e32fd8ea8f75" type="arabic"><li><p id="_9b09ad1f-f89a-aad4-b11c-1a301a61ae91">standardized data models for revision history that work consistently across formats</p>
</li>
<li><p id="_f96f13c8-298b-d952-11cc-f5b6288c107b">support for both simple and complex revision tracking requirements</p>
</li>
<li><p id="_45ebcc84-cd07-32e3-b7db-ef6bb466e9a6">flexible amendment location referencing for precise change documentation</p>
</li>
<li><p id="_a19b5e23-462a-6b98-1d48-b22614a62069">extensible classification system for categorizing types of changes</p>
</li>
<li><p id="_2cf53511-1107-9b10-dce1-1cecf762b314">support for serialization in both YAML and XML formats</p>
</li>
</ol>

<p id="_86a5717b-e4aa-e828-6d06-64fe4a38ec33">This format enables standards developers and document maintainers to capture comprehensive revision information that can be consistently represented across different document renderings while preserving both the structural integrity and semantic meaning of the revision history.</p>
</introduction></preface><sections>
<clause id="_c502b76e-f694-93f5-9f7f-cfae122b62a9" anchor="scope" type="scope" obligation="normative">
<title id="_f70b6ff6-6131-0e24-81e1-850dbe94b63d">Scope</title>
<p id="_a172d0e5-547e-d92f-fa39-f17365daa33d">This document defines a revision history format called the “Metanorma document revision format” for documenting changes made to technical documents over time.</p>

<p id="_f90f0dd6-9832-166d-0827-fe0410919264">It specifies the data models and formats for representing revision history in Metanorma documents, supporting both YAML and XML serialization.</p>

<p id="_4462f5da-bb1d-3171-8398-beec8aff3788">It is a flexible, format-independent revision model, allowing defined revision histories to be consistently presented across various output formats including PDF, HTML, and Word.</p>
</clause>

<terms id="_e57107e0-ef56-a048-9f6a-dd44f26b343c" anchor="terms-and-definitions" obligation="normative">
<title id="_dfb2eab2-f980-6365-3c47-81d0eb272962">Terms and definitions</title><p id="_1fbc7bf1-a8de-c3eb-ee88-3b4cf950e61b">For the purposes of this document, the following terms and definitions apply.</p>
<term id="_d0473c8d-f5f3-bc63-3a6b-72b7765f2722" anchor="term-revision-history"><preferred><expression>
<name>revision history</name>
</expression>
</preferred>
<definition id="_fc6a2aab-9869-e6c6-0335-a36489aba48c"><verbal-definition id="_5bc38ea5-b2d2-ea40-e350-73e6bc5c71a5"><p id="_a502f350-de6a-5432-350c-fcec7ec6a458">structured collection of revisions documenting changes made to a document over time</p></verbal-definition></definition>
 </term>

<term id="_75076488-229f-c971-42ed-1fe2c19f1776" anchor="term-revision"><preferred><expression>
<name>revision</name>
</expression>
</preferred>
<definition id="_837ece7d-9a28-80a8-5aa5-e4d4ed9b8d19"><verbal-definition id="_26671e08-cbb6-ea26-0cff-85cdb9093f27"><p id="_3988f09c-62fe-52da-33b9-31113403f776">set of related changes made to a document at a specific point in time, typically associated with a particular edition or version</p></verbal-definition></definition>
 </term>

<term id="_6752f5a2-f247-9f5d-b728-3efa5de43e44" anchor="term-edition"><preferred><expression>
<name>edition</name>
</expression>
</preferred>
<definition id="_33c5f114-8f82-0c02-549f-0c7bd57c0aab"><verbal-definition id="_81bda023-0eaf-57d5-2bb9-a9a0421ead5a"><p id="_10813486-9b17-dd57-1907-d0148dd0977d">version number or identifier associated with a specific revision of a document</p></verbal-definition></definition>
 </term>

<term id="_5588a9fc-5103-4256-c01d-c878d7885036" anchor="term-amendment"><preferred><expression>
<name>amendment</name>
</expression>
</preferred>
<definition id="_bf343696-6970-59dd-47b1-43023f57d7ce"><verbal-definition id="_e887cc98-3c37-246c-da9a-0585f2155398"><p id="_246d863b-62d7-3806-728f-c2c985c884e8">specific change or set of related changes made to the document content as part of a revision</p></verbal-definition></definition>


 <termexample id="_b8062d38-a032-b513-a040-5116156ce3c4"><p id="_cf354712-1a22-e137-c830-6756a14ccda4">“Updated clause 4.0 and 12.0. Populated clause 9.0.”</p>
</termexample></term>

<term id="_3fc97fd6-0c5b-816c-18a7-4c10b9dfec81" anchor="term-location"><preferred><expression>
<name>location</name>
</expression>
</preferred>
<definition id="_cebdbab5-1431-1440-62be-0214e81e3030"><verbal-definition id="_4cc7712e-43ba-5893-952b-ee2c0c72d89b"><p id="_5e69c971-767c-8649-9a55-717bad09e0d5">specific part of the document affected by an amendment</p></verbal-definition></definition>


 <termexample id="_31dec6ae-ca1e-1998-ca2e-6e423fca6227"><p id="_9271518c-c2ec-4ba8-c3d4-1b8f39450ef6">A location can be a clause (“clause 4.0”), a whole document (“whole”), or specific components like figures, tables, or annexes.</p>
</termexample></term>

<term id="_680e7dff-ebca-99c9-1d93-43e9cc0c8184" anchor="term-classification"><preferred><expression>
<name>classification</name>
</expression>
</preferred>
<definition id="_7f131769-024c-787f-4fc2-2c426fcf082c"><verbal-definition id="_3d329b67-4532-d92f-6cf3-6de7a91c6378"><p id="_74f5814b-53b5-5914-278d-f828d384d020">categorization of an amendment according to specific attributes such as type or severity</p></verbal-definition></definition>


 <termexample id="_2423edbf-cef5-d0dd-11e2-f3b1b2cfaf64"><p id="_101a29ea-3ede-f482-d919-6f825fd5eb11">Classifications might include severity (“major”, “minor”) or type (“editorial”, “technical”).</p>
</termexample></term>

<term id="_5b1e3e74-a289-cf24-0915-00148a98345b" anchor="term-contributor"><preferred><expression>
<name>contributor</name>
</expression>
</preferred>
<definition id="_9aa2848d-6ee9-24a1-4945-b1a5d1619e67"><verbal-definition id="_0284353b-2b30-e629-3847-70f79a03bd9e"><p id="_39095e65-3485-7851-4deb-767f4f7b7847">person or organization responsible for making amendments in a revision</p></verbal-definition></definition>
 </term>

<term id="_8aa094cd-0f63-c47e-5faf-61d0a11983ad" anchor="term-date-information"><preferred><expression>
<name>date information</name>
</expression>
</preferred>
<definition id="_d566e722-d5c6-c84f-c00f-97c468d52c25"><verbal-definition id="_a8c304ad-a635-11f8-cabc-c8ad1023cd32"><p id="_1f3608ca-702c-4395-3b86-9cdcdb3621cc">temporal information associated with a revision, including the specific type of date (e.g., published, updated)</p></verbal-definition></definition>
 </term>
</terms>

<clause id="_c9bc1cfc-8035-b632-c8d4-c714ef7d46ac" anchor="core-models" obligation="normative">
<title id="_948c9e39-bff9-fcb7-dad6-b032b6e5a6a6">Core models</title>
<clause id="_81fcc005-b629-f6e7-f248-0a919273daf7" obligation="normative">
<title id="_53d82e48-1024-e16a-9901-40ceda1ab9b0">General</title>
<p id="_f8956e5a-8123-438d-8ef2-e7bd6b2ac88e">The Metanorma document revision format consists of the following core models:</p>

<ul id="_10c148c8-eeff-57cb-3bb0-a15898496377"><li><p id="_41f63ef2-11dd-705f-139c-9c5928557268"><tt>RevisionHistory</tt>: The main container for all revisions</p>
</li>
<li><p id="_cd57d67a-665d-e9a8-b40e-1a8796fe7635"><tt>Revision</tt>: Represents a single revision entry</p>
</li>
<li><p id="_f3610f56-8a9a-6412-0fa6-8c2586c7f861"><tt>Amendment</tt>: Represents a specific change or set of changes</p>
</li>
<li><p id="_8af8c74d-4411-0e72-82c0-16fd61c2bbcd"><tt>Location</tt>: Specifies the part of the document affected</p>
</li>
<li><p id="_ba6cba4b-689e-db01-1442-aa9743b41d40"><tt>Classification</tt>: Categorizes an amendment</p>
</li>
<li><p id="_91a11673-8ae0-dd42-b0b6-b6c0e905a419"><tt>Contributor</tt>: Identifies who made the changes</p>
</li>
<li><p id="_e585c15e-94c9-1f94-6006-f0071f103b65"><tt>DateInfo</tt>: Provides date information for a revision</p>
</li>
</ul>

<p id="_aa0e6e20-6413-c280-70bb-c717fbd78fdf">The revision format follows this hierarchical structure:</p>

<sourcecode id="_ca975a20-9c27-9f52-4745-f519955a417b"><body>+-------------------+
|  RevisionHistory  |
|                   |
| +revisions        |
+--------+----------+
         |
         | 1..*
+--------v----------+      +------------+
|     Revision      |      |  DateInfo  |
|                   |      |            |
| -edition          |&lt;&gt;---&gt;| -type      |
| -relation_type    |      | -value     |
| +date             |      |            |
| +contributor      |      +------------+
| +amend            |
+--------+----------+
         |
    +----+----+---------------------+
    |         |                     |
+---v---+ +---v----------+  +-------v--------+
|Person | | Organization |  | Amendment      |
|       | |              |  |                |
| +name | | -name        |  | -description   |
|       | | -subdivision |  | -change        |
|       | | -abbreviation|  | +location      |
+---+---+ +--------------+  | +classification|
    |                       +-------+--------+
    |                               |
    |                  +------------+------+
+---v---+              |                   |
| Name  |       +------+-------+   +-------+-------+
|       |       |  Location    |   | Classification|
| -abbr |       |              |   |               |
| -full |       | -type        |   | -tag          |
+-------+       | -value       |   | -value        |
                +--------------+   +---------------+</body></sourcecode>

</clause>

<clause id="_4ae6d277-d53e-75fd-9a33-411e545f6347" obligation="normative">
<title id="_6c68e0b9-bf87-7c86-38d5-310235e46a83">RevisionHistory</title>
<p id="_d9f0b0ce-5df3-54a7-272f-7446c2ba1116">The RevisionHistory class is the main container for all revisions.</p>

<sourcecode id="_019d0a07-1709-58fc-1748-18d2d5b085ca" lang="ruby"><body>class RevisionHistory
  attribute :revisions, Revision, collection: true
end</body></sourcecode>

</clause>

<clause id="_7bda181b-03d7-dc15-2c66-3eec3c092b87" obligation="normative">
<title id="_dffa31fb-361b-9bac-f1f8-1276131d5cf7">Revision</title>
<p id="_a6983564-9061-19f6-a8b3-1dac9ed33d1a">The Revision class represents a single revision entry, which may include multiple amendments.</p>

<sourcecode id="_b5bd4e56-0941-7dec-ada6-259487ba2f35" lang="ruby"><body>class Revision
  attribute :date, DateInfo, collection: true
  attribute :edition, :string
  attribute :contributor, Contributor, collection: true
  attribute :amend, Amendment, collection: true
  attribute :relation_type, Amendment, collection: true
end</body></sourcecode>


<p id="_28669ed8-3370-4a69-601d-fd042d25a591">The <tt>date</tt> attribute is a collection of DateInfo objects that provide information about when the revision occurred.</p>

<p id="_0e1928c2-26d3-8f37-755f-3e28379d7746">The <tt>edition</tt> attribute is a string that represents the version number or identifier for the revision.</p>

<p id="_a73a27ae-6fa8-27ea-9d19-26b3608ad1a0">The <tt>contributor</tt> attribute is a collection of Contributor objects representing the people or organizations responsible for the revision.</p>

<p id="_b41d5614-8d5b-2dde-7b09-310e814196d2">The <tt>amend</tt> attribute is a collection of Amendment objects representing the changes made in the revision.</p>

<p id="_66c12818-321a-9c63-4198-e69a2be64536">The <tt>relation_type</tt> attribute is a collection of Amendment objects representing the relationship between this revision and others, if applicable.</p>
</clause>

<clause id="_aa3572e4-246f-e060-620d-d305115083a7" obligation="normative">
<title id="_f04a88aa-6a58-6d77-7434-1dc630c23858">DateInfo</title>
<p id="_7f2e3703-8523-db12-33af-ac90a3ccd10f">The DateInfo class represents date information associated with a revision.</p>

<sourcecode id="_19dac045-d0da-5bd8-e24d-8f9254d0c230" lang="ruby"><body>class DateInfo
  attribute :type, :string
  attribute :value, :string
end</body></sourcecode>


<p id="_816f55be-62a1-da26-db4c-329b2aad3d5c">The <tt>type</tt> attribute is a string indicating the type of date, such as “published” or “updated”.</p>

<p id="_a766d26d-798b-abb2-d790-b81fca88dbaa">The <tt>value</tt> attribute is a string containing the date value.</p>
</clause>

<clause id="_05898472-c5ca-2417-e768-68f69889b419" obligation="normative">
<title id="_c4c49b90-a514-a5f4-255f-9fa4357954e9">Contributor</title>
<p id="_cccd973e-9076-4931-925e-ad06f1c06bb6">The Contributor class represents a person or organization responsible for a revision.</p>

<sourcecode id="_65af7979-380a-95eb-3f62-9ae05a96ed3c" lang="ruby"><body>class Contributor
  attribute :person, Person
  attribute :organization, Organization
end</body></sourcecode>

</clause>

<clause id="_f30cb93d-c8f0-3309-0ac3-df5e434fcf3c" obligation="normative">
<title id="_59dcd05c-20de-d9b1-0f7c-d073a4680b3c">Person</title>
<p id="_fb081895-1eca-be6c-7a75-ceed00049484">The Person class represents an individual contributor.</p>

<sourcecode id="_f7abb755-6dcc-08e2-938e-6a7d9c350e43" lang="ruby"><body>class Person
  attribute :name, Name
end</body></sourcecode>

</clause>

<clause id="_e7605ae8-7774-643d-f037-8323d77425fc" obligation="normative">
<title id="_75b60ab9-04f5-0903-90e7-27b945c9d22d">Organization</title>
<p id="_89a1127e-0308-9f21-aa55-e238e881ce3a">The Organization class represents an organizational contributor.</p>

<sourcecode id="_3414ad29-dc5a-a881-5a45-11c69ccb86f6" lang="ruby"><body>class Organization
  attribute :name, :string
  attribute :subdivision, :string
  attribute :abbreviation, :string
end</body></sourcecode>


<p id="_0702c2c3-1b4f-ae8f-e549-5849c1d60132">The <tt>name</tt> attribute is a string containing the organization’s name.</p>

<p id="_555cac84-33f4-60e3-5108-e089833cfad8">The <tt>subdivision</tt> attribute is an optional string specifying a department or division within the organization.</p>

<p id="_3697403f-c24d-27d2-2dad-a6339c4d617c">The <tt>abbreviation</tt> attribute is an optional string providing an abbreviated form of the organization’s name.</p>
</clause>

<clause id="_3eff6b04-6537-eac0-2e15-112684837c78" obligation="normative">
<title id="_bf9cc3cd-95ee-0b24-23e3-43689496e60a">Name</title>
<p id="_64a77c3f-0874-b310-1039-155a464e8571">The Name class represents a person’s name.</p>

<sourcecode id="_d65bb90c-cce7-50cc-d174-3d99fb6b5e97" lang="ruby"><body>class Name
  attribute :abbreviation, :string
  attribute :completename, :string
end</body></sourcecode>


<p id="_4953b136-a754-ce26-8b65-3cddd4fd7e98">The <tt>abbreviation</tt> attribute is a string containing the person’s initials or abbreviation.</p>

<p id="_8d91fd5d-d502-5a3f-af3b-794af843e982">The <tt>completename</tt> attribute is a string containing the person’s full name.</p>
</clause>

<clause id="_7731b00d-c36d-a7a9-6418-4d27a55d332c" obligation="normative">
<title id="_c8129ae5-6be0-e1f9-5a3d-30c7cf9c8235">Amendment</title>
<p id="_a6707131-61e2-5ab5-eea8-b8f084100d6e">The Amendment class represents a specific change or set of changes made to the document.</p>

<sourcecode id="_d0fa163f-efda-412e-8014-05230a3c86f9" lang="ruby"><body>class Amendment
  attribute :description, :string
  attribute :location, Location, collection: true
  attribute :classification, Classification, collection: true
  attribute :change, :string, default: -&gt; { "modify" }
end</body></sourcecode>


<p id="_781d2880-9d53-2f39-2f6b-bbbacac71058">The <tt>description</tt> attribute is a string describing the changes made.</p>

<p id="_852c3645-1ef5-c542-76f2-39ae45d3e784">The <tt>location</tt> attribute is a collection of Location objects specifying the parts of the document affected by the amendment.</p>

<p id="_edfd8cd2-c752-ea52-6f38-786cd6772914">The <tt>classification</tt> attribute is a collection of Classification objects categorizing the amendment.</p>

<p id="_6ff7c37c-097c-b6a5-6888-5a683aa0824c">The <tt>change</tt> attribute is a string indicating the type of change, defaulting to “modify”.</p>
</clause>

<clause id="_aa837942-ac19-77c5-6574-0b4a7b9add13" obligation="normative">
<title id="_e30424cf-3f26-37f6-3a46-c814baacd0b0">Location</title>
<p id="_f7f0e7df-e20b-e80f-4ed2-e016e2cdd3b8">The Location class specifies the part of the document affected by an amendment.</p>

<sourcecode id="_8912554a-1c50-9daa-82ae-670626d8289e" lang="ruby"><body>class Location
  VALID_TYPES = %w[
    section clause part paragraph chapter page line table annex figure
    example note formula list time anchor whole
  ].freeze

  attribute :value, :string
  attribute :type, :string, values: VALID_TYPES
end</body></sourcecode>


<p id="_c88212cb-e1a0-0604-bff8-2d3253dae0ef">The <tt>value</tt> attribute is a string specifying the specific value of the location, such as “4.0” for clause 4.0, or “B” for Annex B.</p>

<p id="_0ce190f0-6dd9-a1f2-6514-a3baaf09d248">The <tt>type</tt> attribute is a string indicating the type of location, such as “clause”, “annex”, or “whole”.</p>
</clause>

<clause id="_3a5c96e3-ac23-ea2e-e89c-344e89cd41f3" obligation="normative">
<title id="_fadef585-e70f-f683-80de-fc1b3cf0063c">Classification</title>
<p id="_4b73c1ee-5f62-834f-f877-0112b61c88c5">The Classification class categorizes an amendment according to specific attributes.</p>

<sourcecode id="_6d52d615-f0f1-1fb2-f5fe-b388d08a1f3d" lang="ruby"><body>class Classification
  attribute :tag, :string
  attribute :value, :string
end</body></sourcecode>


<p id="_3a3efefa-9198-0c17-8364-1e8b0c881d19">The <tt>tag</tt> attribute is a string indicating the classification category, such as “severity” or “type”.</p>

<p id="_bddb9432-afcb-c4d4-a684-08515f5484d0">The <tt>value</tt> attribute is a string specifying the classification value, such as “major” or “editorial”.</p>
</clause>
</clause>

<clause id="_83ebb75e-03be-eac8-8cb5-9caab6b2deba" obligation="normative">
<title id="_5eaa977d-c10c-1269-1054-6979a0b82760">Document format serialization</title>
<clause id="_7ec82bf3-7078-e387-1e83-f17b213726d1" obligation="normative">
<title id="_d432756c-3b0b-2f42-007d-fb6cf9e63ae5">YAML format</title>
<p id="_e722fe4b-1fa2-88c0-dbd2-ff9f7f168c88">The Metanorma document revision format can be serialized as YAML, which is often used in configuration files and is human-readable.</p>

<example id="_1d563f17-0268-c9c0-ffb3-92a3c4e08419"><sourcecode id="_674ba003-7404-b101-5467-a26ce5f0a2a8" lang="yaml"><body>revisions:
  - date:
    - type: published
      value:  2012-04
    edition: 1.0.0
    contributor:
    - person:
        name:
          abbreviation: JMS
          completename: J. Michael Straczynski
    amend:
      - description: Approved edition of S-102
  - date:
    - type: updated
      value:  2017-03
    edition: 2.0.0
    contributor:
    - organization:
        name: S-102PT
    amend:
      - description: |
          Updated clause 4.0 and 12.0.

          Populated clause 9.0.
        location:
          - type: clause
            value: 4.0
          - type: clause
            value: 12.0
          - type: clause
            value: 9.0
          - type: whole
        classification:
          - tag: severity
            value: major
          - tag: type
            value: editorial
      - description: Deleted contents of Annex B in preparation for updated S-100 Part 10C guidance.
        location:
          - type: annex
            value: B</body></sourcecode> </example>
</clause>

<clause id="_f525f0b1-8680-affa-2c1e-73fc5406949a" obligation="normative">
<title id="_7575a2ca-09e7-a05b-d17d-de60c607fd38">XML format</title>
<p id="_4096b2c0-caed-2254-4b5e-4f50bfdf6fcb">The same revision history can also be serialized as XML, which is commonly used for structured data interchange.</p>

<example id="_f5b59efa-e5c4-ed33-bec5-49666d3d5f6b"><sourcecode id="_0722d0e2-7649-d0a0-eeb7-8be765235d91" lang="xml"><body>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;revision-history&gt;
  &lt;revision&gt;
    &lt;date&gt;
      &lt;type&gt;published&lt;/type&gt;
      &lt;value&gt;2012-04&lt;/value&gt;
    &lt;/date&gt;
    &lt;edition&gt;1.0.0&lt;/edition&gt;
    &lt;contributor&gt;
      &lt;person&gt;
        &lt;name&gt;
          &lt;abbreviation&gt;JMS&lt;/abbreviation&gt;
          &lt;completename&gt;J. Michael Straczynski&lt;/completename&gt;
        &lt;/name&gt;
      &lt;/person&gt;
    &lt;/contributor&gt;
    &lt;amend&gt;
      &lt;description&gt;Approved edition of S-102&lt;/description&gt;
    &lt;/amend&gt;
  &lt;/revision&gt;
  &lt;revision&gt;
    &lt;date&gt;
      &lt;type&gt;updated&lt;/type&gt;
      &lt;value&gt;2017-03&lt;/value&gt;
    &lt;/date&gt;
    &lt;edition&gt;2.0.0&lt;/edition&gt;
    &lt;contributor&gt;
      &lt;organization&gt;
        &lt;name&gt;S-102PT&lt;/name&gt;
      &lt;/organization&gt;
    &lt;/contributor&gt;
    &lt;amend&gt;
      &lt;description&gt;Updated clause 4.0 and 12.0.

Populated clause 9.0.&lt;/description&gt;
      &lt;location type="clause"&gt;4.0&lt;/location&gt;
      &lt;location type="clause"&gt;12.0&lt;/location&gt;
      &lt;location type="clause"&gt;9.0&lt;/location&gt;
      &lt;location type="whole"&gt;&lt;/location&gt;
      &lt;classification&gt;
        &lt;tag&gt;severity&lt;/tag&gt;
        &lt;value&gt;major&lt;/value&gt;
      &lt;/classification&gt;
      &lt;classification&gt;
        &lt;tag&gt;type&lt;/tag&gt;
        &lt;value&gt;editorial&lt;/value&gt;
      &lt;/classification&gt;
    &lt;/amend&gt;
    &lt;amend&gt;
      &lt;description&gt;Deleted contents of Annex B in preparation for updated S-100 Part 10C guidance.&lt;/description&gt;
      &lt;location type="annex"&gt;B&lt;/location&gt;
    &lt;/amend&gt;
  &lt;/revision&gt;
&lt;/revision-history&gt;</body></sourcecode> </example>
</clause>
</clause>

<clause id="_13a31e70-0d60-4f68-94b8-a5f622b489ab" obligation="normative">
<title id="_633674fb-51ee-02c4-0d5a-e7856fedc632">Usage</title>
<clause id="_a9a669dc-5552-cb50-34f7-c0705f9e771c" obligation="normative">
<title id="_f11d19bd-4f86-edfc-f071-37d4436eb782">Parsing revision history</title>
<clause id="_b086ea79-9bea-24c6-a08a-26b48ceec5a5" obligation="normative">
<title id="_fef3828d-8eb2-8ca9-ef1f-3b155058581d">From YAML</title>
<p id="_3b5fbce5-f890-197d-abc1-2c20142c6325">The following Ruby code demonstrates how to parse a revision history from a YAML string:</p>

<sourcecode id="_83560551-ce73-8054-669d-cdd0ea3f7523" lang="ruby"><body>require 'revix'

# Parse from YAML string
yaml_content = File.read('revision_history.yaml')
history = Revix::RevisionHistory.from_yaml(yaml_content)

# Access revision data
history.revisions.each do |revision|
  puts "Edition: #{revision.edition}"

  revision.date.each do |date|
    puts "Date: #{date.value} (#{date.type})"
  end

  revision.contributor.each do |contributor|
    if contributor.person
      puts "Contributor: #{contributor.person.name.completename} (#{contributor.person.name.abbreviation})"
    elsif contributor.organization
      puts "Contributor: #{contributor.organization.name}"
    end
  end

  revision.amend.each do |amendment|
    puts "Amendment: #{amendment.description}"

    amendment.location&amp;.each do |location|
      if location.value
        puts "  Location: #{location.type}=#{location.value}"
      else
        puts "  Location: #{location.type}"
      end
    end

    amendment.classification&amp;.each do |classification|
      puts "  Classification: #{classification.tag} = #{classification.value}"
    end
  end
end</body></sourcecode>

</clause>

<clause id="_4c31b515-b937-e787-61cc-2e407d1dd3c1" obligation="normative">
<title id="_0d2d82a6-5ca2-a248-28cf-d83ee1922056">From XML</title>
<p id="_4e9cb952-3a99-e4e4-89fc-134bbf908e64">The following Ruby code demonstrates how to parse a revision history from an XML string:</p>

<sourcecode id="_bd9f6447-06b6-74d3-dd06-a0f5dba8aee0" lang="ruby"><body>require 'revix'

# Parse from XML string
xml_content = File.read('revision_history.xml')
history = Revix::RevisionHistory.from_xml(xml_content)

# Access revision data (same as with YAML)
# ...</body></sourcecode>

</clause>
</clause>

<clause id="_c10f48cd-e5ac-c893-1c8f-20236929eb76" obligation="normative">
<title id="_1a9013ba-aea2-1774-d94f-150aaa2630b8">Creating revision history</title>
<p id="_6ec000fc-9092-50f4-6fc8-415c3f917c04">The following Ruby code demonstrates how to create a revision history programmatically:</p>

<sourcecode id="_d008d232-ef5b-c84e-3dcb-1c7c3265b627" lang="ruby"><body>require 'revix'

# Create a revision history object
history = Revix::RevisionHistory.new(revisions: [
  Revix::Revision.new(
    date: [Revix::DateInfo.new(type: "published", value: "2012-04")],
    edition: "1.0.0",
    contributor: [
      Revix::Contributor.new(
        person: Revix::Person.new(
          name: Revix::Name.new(
            abbreviation: "JMS",
            completename: "J. Michael Straczynski"
          )
        )
      )
    ],
    amend: [
      Revix::Amendment.new(
        description: "Approved edition of S-102",
        location: [
          Revix::Location.new(type: "clause", value: "4.0"),
          Revix::Location.new(type: "whole")
        ]
      )
    ]
  )
])</body></sourcecode>

</clause>

<clause id="_b4e9e7dc-dfba-1d83-9614-3e349c411e27" obligation="normative">
<title id="_3f211636-8738-179e-8d36-5bd4b55414e0">Serializing revision history</title>
<clause id="_96804b7f-6005-4b3b-8aff-397a1e295b01" obligation="normative">
<title id="_a26e471b-162e-e108-55e9-dac2f70cb408">To YAML</title>
<p id="_35865ff7-39a0-aad1-29ee-36904f24b3ed">The following Ruby code demonstrates how to serialize a revision history to YAML:</p>

<sourcecode id="_fbba9dce-e8e6-79af-2727-1aadb0215ee5" lang="ruby"><body># Serialize to YAML
yaml_content = history.to_yaml
File.write('revision_history.yaml', yaml_content)</body></sourcecode>

</clause>

<clause id="_181b0183-1fad-c68e-1344-6a97c242fbe7" obligation="normative">
<title id="_b546ede0-bfff-2735-1a8d-b5eca4e24f27">To XML</title>
<p id="_d16ce963-e0be-792a-d624-67090296906d">The following Ruby code demonstrates how to serialize a revision history to XML:</p>

<sourcecode id="_f3cb1cbf-71bc-fcfe-dd9d-7086c1b7e53c" lang="ruby"><body># Serialize to XML
xml_content = history.to_xml
File.write('revision_history.xml', xml_content)</body></sourcecode>

</clause>
</clause>
</clause>

<clause id="_65fe53b5-3fe6-727a-5cf9-76a7c663fc95" obligation="normative">
<title id="_3ec4c46c-f8d2-5f13-1169-c7e24fb6d5ce">Best practices</title>
<clause id="_b76ecada-f21b-604c-7476-8d610259f7af" obligation="normative">
<title id="_088d0dec-43d1-3d52-4e99-f26b2796e971">Amendment descriptions</title>
<p id="_d312954a-d197-3514-c9f3-6e2f6971d2a5">Amendment descriptions should be:</p>

<ul id="_4a1dc71b-0b63-9db4-3aa9-4700a7b00a3c"><li><p id="_07a9d03b-9cd3-eb37-e8f3-3014fdf672c5">Clear and concise, focusing on what changed</p>
</li>
<li><p id="_89065163-76c6-00f1-871e-9a8b8ade795f">Specific about the nature of the change</p>
</li>
<li><p id="_c121347f-6df5-a9e2-d236-dc774024f05e">Written in past tense (e.g., “Updated clause 4.0”)</p>
</li>
<li><p id="_a3ae8332-36a2-d942-bbf1-f310e5cd6fb6">Grouped logically when multiple related changes occurred</p>
</li>
</ul>
</clause>

<clause id="_399ad719-5a1a-ebcc-945a-9778f55e5c6a" obligation="normative">
<title id="_b3f7d387-b3d4-e2e6-ffae-1571f6f17d5e">Location specificity</title>
<p id="_b74850cc-0974-6a0f-1bdb-61ee8e970be3">Locations should be as specific as possible:</p>

<ul id="_810adc11-924b-0dc7-9fab-f09c5da6615f"><li><p id="_e686531f-6e22-d683-c41f-d9aebfdc3db1">Use the most precise location type available</p>
</li>
<li><p id="_990948be-ba18-f77c-fb18-551c04ccf591">Include specific values where applicable</p>
</li>
<li><p id="_e6360606-9a50-8ecf-4f4a-e4cbf57810da">Use “whole” only when the entire document is affected</p>
</li>
<li><p id="_06f7cbdf-6d64-b06e-9e6b-da09496d668b">List multiple locations for changes that span different sections</p>
</li>
</ul>
</clause>

<clause id="_971bf4f7-4279-d143-b74c-2864ae5291b2" obligation="normative">
<title id="_1a6f3f2c-665b-1e6b-f89d-785228e2c674">Change classification</title>
<p id="_84366ab4-6961-f847-9cdb-12f856bbeb05">Classifications help users understand the impact and nature of changes:</p>

<ul id="_61c063b3-5594-0ce4-693d-46aa0c5f8df5"><li><p id="_d2cbbd86-b7aa-7226-4bcf-5222c7cbb5e0">Use consistent classification tags across revisions</p>
</li>
<li><p id="_0c00bbb5-ede0-5539-f148-6f412bb0ea09">Include severity classifications (e.g., major, minor) for significant changes</p>
</li>
<li><p id="_20ea936b-4d4a-01c1-34ca-b74eb1a27012">Include type classifications (e.g., editorial, technical) to indicate the nature of changes</p>
</li>
<li><p id="_78df5aeb-bfd6-abb8-f6ec-d5dfdeeb90bc">Consider adding purpose classifications (e.g., clarification, correction) when relevant</p>
</li>
</ul>
</clause>

<clause id="_06915570-d153-e0b9-6a6e-4cdf9ec26f87" obligation="normative">
<title id="_e16f0b41-0404-3c76-d25a-068e12677dee">Date information</title>
<p id="_58eb37de-08d5-a849-b3a5-0db60be661da">Date information should:</p>

<ul id="_d2f5d2d1-7cf7-3241-8889-c2acde9e12bc"><li><p id="_9dbcce78-0ed8-2fbb-407b-43b6d680a90e">Include a clear type indicator (published, updated, etc.)</p>
</li>
<li><p id="_1427aa31-ead6-9794-6698-629aaef41634">Follow a consistent date format across all revisions</p>
</li>
<li><p id="_ff1aac0a-e2c0-a1e8-6179-d7dad3577f26">Provide the appropriate level of precision (year, year-month, or full date)</p>
</li>
</ul>
</clause>

<clause id="_9cc38fc1-b6fc-e060-efef-c5d6d91a489b" obligation="normative">
<title id="_528968bc-03b9-e2ad-68b8-e026b1bb4bb5">Multiple contributors</title>
<p id="_0713f051-13c6-6928-dc15-d068d415c0bf">When multiple contributors are involved:</p>

<ul id="_cd4a88a0-cf78-acd0-3f3c-a42161e8ea89"><li><p id="_06af270e-5131-2d95-4b5a-d4fee37d0f05">List all significant contributors to the revision</p>
</li>
<li><p id="_cd6e7339-26cd-63c5-910c-c3380242c1f4">Use organization contributors for changes made by groups</p>
</li>
<li><p id="_290e325f-95f3-23c7-a48e-ef6b45ac7bf8">Use person contributors for individual attributions</p>
</li>
<li><p id="_8ba86b8c-e7ed-a4f3-0cf6-6b4021cfc0ac">Consider using both when an individual contributed on behalf of an organization</p>
</li>
</ul>
</clause>
</clause>


</sections><annex id="_a0763bed-11b7-a009-d675-4aa8a4a4ff10" anchor="revision-patterns" obligation="normative">
<title id="_2c890bc1-ff0a-c3c2-f407-c34123654e8e">Common revision patterns</title>
<clause id="_0f2faefd-bb5a-3cef-e3e1-1a8f5d232b30" obligation="normative">
<title id="_b5388df3-51bc-3613-bb98-1e1f06e16d6e">Initial publication</title>
<p id="_252fd6e9-4d02-383c-fdc3-88e36fe2fa88">The initial publication of a document typically has a simple revision entry:</p>

<sourcecode id="_f90dce72-e5ef-38a4-0454-c9e58768a6b8" lang="yaml"><body>revisions:
  - date:
    - type: published
      value: 2023-01-15
    edition: 1.0.0
    contributor:
    - organization:
        name: Technical Committee
    amend:
      - description: Initial release
        location:
          - type: whole</body></sourcecode>

</clause>

<clause id="_6ea59ebf-2a4f-3c92-df8f-eaa6f16f29ed" obligation="normative">
<title id="_e4a63932-9e71-eb32-ddd2-cf086ee6ad7c">Editorial corrections</title>
<p id="_18394e98-1661-45b6-0fe0-ced178a85e43">Minor editorial corrections are typically documented as follows:</p>

<sourcecode id="_4d74f899-0d6c-ad30-85cc-f9a6c5d5d34c" lang="yaml"><body>revisions:
  - date:
    - type: corrected
      value: 2023-02-20
    edition: 1.0.1
    contributor:
    - organization:
        name: Editorial Team
    amend:
      - description: Corrected typographical errors
        location:
          - type: clause
            value: 3.2
          - type: clause
            value: 5.1
        classification:
          - tag: severity
            value: minor
          - tag: type
            value: editorial</body></sourcecode>

</clause>

<clause id="_21c036d1-2827-88d9-d19f-1fe47727cf4f" obligation="normative">
<title id="_8c206e99-2e21-228e-2819-95e1323806ca">Technical amendments</title>
<p id="_9fcc10bb-2e91-901c-6154-5b397ee21824">Significant technical changes are typically documented with detailed classifications:</p>

<sourcecode id="_22e23b3c-914a-20b4-abed-c8146c3d32bd" lang="yaml"><body>revisions:
  - date:
    - type: updated
      value: 2023-06-10
    edition: 1.1.0
    contributor:
    - organization:
        name: Technical Committee
    amend:
      - description: Updated calculation method for performance metrics
        location:
          - type: clause
            value: 8.3
          - type: formula
            value: 12
        classification:
          - tag: severity
            value: major
          - tag: type
            value: technical
          - tag: purpose
            value: improvement</body></sourcecode>

</clause>

<clause id="_625c2531-2b99-de31-dd03-7bfeb02cd63e" obligation="normative">
<title id="_4ad1e333-7649-00de-8f45-4c4d32a8a069">Multiple amendments in one revision</title>
<p id="_02e4c8a4-1267-f177-42a8-30d98c79bded">A single revision often includes multiple amendments:</p>

<sourcecode id="_d8b22b18-0b24-eb61-929b-654aca3f7c18" lang="yaml"><body>revisions:
  - date:
    - type: updated
      value: 2023-09-05
    edition: 2.0.0
    contributor:
    - organization:
        name: Joint Working Group
    amend:
      - description: Restructured document organization
        location:
          - type: whole
        classification:
          - tag: severity
            value: major
          - tag: type
            value: structural
      - description: Added new section on security considerations
        location:
          - type: clause
            value: 10
        classification:
          - tag: severity
            value: major
          - tag: type
            value: addition
      - description: Updated all diagrams for clarity
        location:
          - type: figure
        classification:
          - tag: severity
            value: minor
          - tag: type
            value: editorial</body></sourcecode>

</clause>

<clause id="_4a23f6f1-4c5e-a6f6-85bc-b40995be190e" obligation="normative">
<title id="_6ff4fe0f-1c32-3f91-ebbf-3fa68aefe153">Multiple contributors</title>
<p id="_b1c08c4b-8a1d-8a03-e9b0-8fe90677608d">Revisions with multiple contributors can be documented as follows:</p>

<sourcecode id="_1dc8a1e8-6d4e-95d2-7e28-48cb296af24d" lang="yaml"><body>revisions:
  - date:
    - type: updated
      value: 2023-11-12
    edition: 2.1.0
    contributor:
    - person:
        name:
          abbreviation: JD
          completename: Jane Doe
    - person:
        name:
          abbreviation: JS
          completename: John Smith
    - organization:
        name: Expert Panel
        subdivision: Security Group
    amend:
      - description: Enhanced security protocols
        location:
          - type: clause
            value: 12.3
          - type: annex
            value: A
        classification:
          - tag: severity
            value: major
          - tag: type
            value: technical</body></sourcecode>

</clause>
</annex>
</metanorma>
