Revisions
A revision provides a mechanism for storing information about the evolution of the document (i.e., the set of modifications made to a document by one of more authors). When an application adds revisions to the content of a WordprocessingML document, depending on the revision type they are specifying this by storing either:
The current state of the document (a deletion stores the current state of the text as deleted, and implies that its original state was the content that used to exist)
The initial state of the document (a run's initial properties are explicitly stored in a previous run properties block, as the current run properties are always those that are the child of the
<rPr>
element
A revision consists of two required pieces of information:
The revision type (specified via the name of the revision element)
A unique revision identifier (used to uniquely identify revisions)
As well as optional information:
The author of the revision
The date and time of the revision
A revision is stored using the inline annotation format or the property annotation format.
Consider a paragraph of text in a WordprocessingML document in which one word has been inserted, as follows:
This paragraph has the word text
marked inserted as a revision, and is represented as the following WordprocessingML:
<w:p> <w:r> <w:t>Some</w:t> </w:r> <w:ins w:id="0" w:author="Joe Smith" w:date="2006-03-31T12:50:00Z"> <w:r> <w:t>text</w:t> </w:r> </w:ins> </w:p>
The <ins>
element contains all of the content that shall be treated as revision marked as inserted (i.e., the word text
).
This means that it contains both required pieces of information: the revision type, specified by the name of the revision element (<ins>
); and a unique revision identifier of 0
.
The element also stores the optional information about the revision: the word text
was inserted by Joe Smith
on March 31, 2006 at 12:50 pm.
Within a WordprocessingML document, the following types of revisions can be used to track the changes to a document (each annotation's form in parentheses):
Insertions (inline annotations for run content, property annotations for tables and paragraphs)
Deletions (inline annotations for run content, property annotations for tables and paragraphs)
Moves (inline annotations)
Changes to run/paragraph/table/numbering/section properties (property annotations)
Changes to custom XML markup (property annotations)