Understanding how version numbers behave
The Document Object class uses a string that allows the use of keywords, branch separators and other combinations. The allowed values for the version string parameter are described in this section.
The following table indicates the allowed values for the version string parameter.
| Regular Expression or Case Insensitive Keyword | Description | Example |
|---|---|---|
[1-9][0-9]*(\.[1-9][0-9]*\.[1-9][0-9]*)* | An exact version number with option to support branches.
|
|
new ([1-9][0-9]*\.[1-9][0-9](\.[1-9][0-9]*\.[1-9][0-9]*)*)? | To indicate a new version. Can be followed by a branch number for a new version on that branch.
|
|
latest ([1-9][0-9]*\.[1-9][0-9](\.[1-9][0-9]*\.[1-9][0-9]*)*)? | To indicate the latest version. Can be followed by a branch number for the latest version on that branch. |
|
latestafterfilter ([1-9][0-9]*\.[1-9][0-9](\.[1-9][0-9]*\.[1-9][0-9]*)*)? | To indicate the latest version that is available after filtering. Can be followed by a branch number. When followed by a branch number and there is no object that matches the filter on the given branch, then an ancestor version is returned (when available). |
|
latestonbranchafterfilter [1-9][0-9]*\.[1-9][0-9](\.[1-9][0-9]*\.[1-9][0-9]*)* | To indicate the latest version on a branch that is available after filtering. Has to be followed by a branch number. When there is no object that matches the filter on the given branch, nothing is returned |
|
| empty | To indicate no version number at all. Used for example to delete a logical object. |
|