扩展版本

From Apache OpenOffice Wiki
< Zh‎ | Documentation
Revision as of 09:23, 26 September 2008 by Jirong (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


随着时间的过去扩展会被不断的改进。这意味着,发行者要发布带有新功能和(或)修改补丁的相同扩展的新版本。加入“扩展版本”允许发行者发布新版本,并允许 OpenOffice.org 检测和处理“由用户安装的扩展是一个已安装扩展的更新”这种情况。

技术上说,扩展版本 v 由一个无限的非负的实数序列来定义:v = ‹v0, v1, ...›,其中一些有限数量的元素值为零。全序是版本上通过字典序比较定义。版本 v 的文字表达 v = ‹v0, v1, ...› 就是一个从 BNF 创建的无限的字串

 version ::= [element (“.” element)*]
 element ::= (“0” | “1” | “2” | “3” | “4” | “5” | “6” | “7” | “8” | “9”)+ 

拥有 n ≥ 0 个元素,每个元素是十进制表示的 vi(其中0 ≤ i < n),而对于 i ≥ n 每个 vi = 0。

The extension version is obtained from the description.xml contained in the extension. If the extension does not specify such an explicit version, then an implict textual version representation of the empty string (representing a version of all zeroes) is assumed.

No general semantics are prescribed to versions, other than the total order which determines whether one version is less than, equal to, or greater than another version, respectively. However, extension publishers are encouraged to use the widely accepted three-level scheme of major (incompatible changes), minor (compatible changes), micro (bug fixes) where applicable.


See also


Content on this page is licensed under the Public Documentation License (PDL).
Personal tools
In other languages