4.11 Versioning

Support for versioning is an optional feature. The versioning system is built on top of the system of workspaces and referenceable nodes described above.

In a repository that supports versioning, a workspace may contain both versionable and nonversionable nodes. A node is versionable if and only if it has been assigned the mixin type mix:versionable, otherwise it is nonversionable. Repositories that do not support versioning will simply not provide this mixin type, whereas repositories that do support versioning must provide it. The type mix:versionable is a subtype of mix:referenceable, so if a node is versionable it is automatically also referenceable and thus has a UUID.

Being versionable means that at any given time the node's state can be saved for possible future recovery. This saved state is called a version and the action of saving it is called checking in.

Versions exist as part of a version history. Within a version history, the versions form a version graph that describes the predecessor/successor relations among versions of a particular versionable node.

Version histories and their contained versions are stored in version storage. There is one version storage per repository, though it is exposed in each workspace as a special protected subtree below the node /jcr:system/jcr:versionStorage.