26. diffSupport

'on' | 'off' | 'toggle' | 'state' |
'revisions.on' | 'revisions.off' | 'revisions.toggle' | 'revisions.state'

Adds or removes information related to revision support to/from the document being edited.

on

Enable the comparison of revisions of the document being edited. No effect if this comparison is already enabled.

This is implemented by adding a unique serial number to all the elements of the document. Such serial numbers are saved as <?xxe-sn> processing instructions. More information in Section 2, “Elements are given serial numbers”.

off

Disable the comparison of revisions of the document being edited. No effect if this comparison is already disabled.

This is implemented by removing their serial numbers from all the elements of the document.

toggle

Toggle the comparison of revisions of the document being edited.

state

Returns "on" if the comparison of revisions is enabled. Returns "off" otherwise.

revisions.on

Start storing all the revisions of the document being edited in the XML file containing this document. No effect if this option has already been chosen.

This is implemented by computing the binary delta (VCDIFF algorithm) between a normalized XML representation of the document being edited and a normalized XML representation of the document at the beginning of the editing session (that is, before any modification). Such binary deltas are base-64 encoded in order to be saved in a single <?xxe-revisions> processing instruction found at the end of the document. More information in Appendix B, Format of the revision history.

[Important]

Option revisions.on implies option on. If the option of storing all the revisions of the document being edited has been chosen, then it is also possible to compare the revisions of this document.

Option revisions.off does not implies option off. Stopping to store all the revisions of the document being edited does not mean that you'll no longer be able to compare the revisions of this document. For that, you'll have to use option off because option off implies option revisions.off.

revisions.off

Stop storing all the revisions of the document being edited in the XML file containing this document. No effect if this option has already been chosen.

revisions.toggle

Toggle the storage of revisions in the XML file containing the document being edited.

revisions.state

Returns "revisions.on" if the option of storing all the revisions of the document being edited has been chosen. Returns "revisions.off" otherwise.

Examples:

diffSupport on
diffSupport state
diffSupport revisions.toggle