Difference between revisions of "Zh/Documentation/DevGuide/Extensions/Description of XML Elements"

From Apache OpenOffice Wiki
Jump to: navigation, search
m (<code>/description/update-information</code> 元素)
m (<code>/description/update-information</code> 元素)
 
(28 intermediate revisions by the same user not shown)
Line 27: Line 27:
  
 
<code><description></code> 是 ''description.xml'' 的根元素。
 
<code><description></code> 是 ''description.xml'' 的根元素。
 
  
 
{|border="1" cellpadding=4 style="border-collapse:collapse;"
 
{|border="1" cellpadding=4 style="border-collapse:collapse;"
Line 54: Line 53:
 
* 子元素: 无
 
* 子元素: 无
 
*始用于:OOo 2.2
 
*始用于:OOo 2.2
 
  
 
{|border="1" cellpadding=4 style="border-collapse:collapse;"
 
{|border="1" cellpadding=4 style="border-collapse:collapse;"
Line 65: Line 63:
 
|必需。扩展标识符。
 
|必需。扩展标识符。
 
|}
 
|}
 
  
 
'''也请参阅'''
 
'''也请参阅'''
Line 77: Line 74:
 
*子元素: 无
 
*子元素: 无
 
*始用于: OOo 2.1
 
*始用于: OOo 2.1
 
  
 
{|border="1" cellpadding=4 style="border-collapse:collapse;"
 
{|border="1" cellpadding=4 style="border-collapse:collapse;"
Line 88: Line 84:
 
|必需。扩展版本的文字表现形式。
 
|必需。扩展版本的文字表现形式。
 
|}
 
|}
 
  
 
'''也请参阅'''
 
'''也请参阅'''
Line 100: Line 95:
 
*子元素: 无
 
*子元素: 无
 
*始用于: OOo 3.0
 
*始用于: OOo 3.0
 
  
 
{|border="1" cellpadding=4 style="border-collapse:collapse;"
 
{|border="1" cellpadding=4 style="border-collapse:collapse;"
Line 111: Line 105:
 
|必需。为表示特定平台的符号。详见 [[Zh/Documentation/DevGuide/Extensions/Target Platform|目标平台]]。
 
|必需。为表示特定平台的符号。详见 [[Zh/Documentation/DevGuide/Extensions/Target Platform|目标平台]]。
 
|}
 
|}
 
  
 
'''也请参阅'''
 
'''也请参阅'''
Line 139: Line 132:
 
* 始用于: OOo 2.0.4
 
* 始用于: OOo 2.0.4
  
这个元素包含 <code><license-text></code> 元素,验证是否所有用户接收这个 license,或只是安装者接收此 license,并且验证默认的 <code><license-text></code> 元素。在 OOo 2.4 版本中,这个验证“默认”的机制已被修改。详见 [[Zh/Documentation/DevGuide/Extensions/Localized XML Elements]]。
+
这个元素包含 <code><license-text></code> 元素,验证是否所有用户接收这个授权许可对,或只是安装者接收此授权许可对,并且验证默认的 <code><license-text></code> 元素。检验 “默认" 的机制在 OOo 2.4 版本做了变更。详见 [[Zh/Documentation/DevGuide/Extensions/Localized XML Elements|本地化 XML 元素]]。
 
+
  
 
如果 <code><simple-license></code> 元素存在的话,那么它必需包含至少一个子元素。
 
如果 <code><simple-license></code> 元素存在的话,那么它必需包含至少一个子元素。
Line 151: Line 143:
 
|-
 
|-
 
|<code>accept-by</code>  
 
|<code>accept-by</code>  
|<code>Required.Value</code> is either “user” or “admin”. “user” means that every user has to agree to the license. That is, the extension can only be installed as user extension but not as shared extension. If it has the value “admin” then it can be deployed as shared extension as well. In that case only the person who installs it has to agree to the license. Individual users will not be asked to accept the license. They can use the extension right away. In case the value is “user” and the extension is being installed as user extension then the user must always agree to the license.
+
|必需。<code>Value</code> 可以是 “user” 或 “admin”。“user” 意味着每个用户必需接受此授权许可对。也就是说,此扩展只能被安装为用户扩展而非共享扩展。如果值为 “admin”,那么扩展才可以被部署为共享扩展。在那种情况下只有安装者才必需接受授权许可对。不需要询问每个用户去接受此授权许可对。他们可以直接使用此扩展。在值为 “user” 时扩展被安装成用户扩展,那么用户都会被询问是否接受此授权许可对。
 
|-
 
|-
 
|<code>default-license-id</code>  
 
|<code>default-license-id</code>  
|Required. Since OOo 2.4 this attribute is '''obsolete'''. If the extension should work properly (regarding showing the proper license during installation) on versions prior 2.4 one must use this attribute. If one does not use this attribute then one should use the [[Zh/Documentation/DevGuide/Extensions/Description of XML Elements#/description/dependencies/OpenOffice.org-minimal-version 元素|OpenOffice.org-minimal-version]] dependency with a value of '2.4'.
+
|必需。自 OOo 2.4 版本起,此属性被认为是'''陈旧'''属性。如果扩展需要正确地在 2.4 之前的版本上运行的话(在安装过程中显示正确的授权许可)就必需使用这个属性。如果不使用这个属性那么就应该使用 [[Zh/Documentation/DevGuide/Extensions/Description of XML Elements#/description/dependencies/OpenOffice.org-minimal-version 元素|OpenOffice.org-minimal-version]] 值为 '2.4' 的依赖关系。
The attribute determines what <license-text> is used if no <license-text> element has a lang attribute whose value matches the locals of {{PRODUCTNAME}}. There must always be exactly one <code><license-text></code> element with a license-id attribute whose value matches that of the default-license-id. The type is <code>xsd:IDREF</code>.
+
 
 +
这个属性确定如果没有一个 <license-text> 元素的 lang 属性值可以与 {{PRODUCTNAME}} 的安装地域相匹配时使用什么 <license-text>。任何时候只有一个带 ''license-id'' 属性的 <code><license-text></code> 元素。''license-id'' 值与 ''default-license-id'' 相匹配,类型为 <code>xsd:IDREF</code>
 
|-
 
|-
 
|<code>suppress-on-update</code>  
 
|<code>suppress-on-update</code>  
|Optional. When the attribute is not provided then the value “false” is assumed. The value true indicates that the license for this extension will not be displayed during installation when the same extension (same id but probably different version) is already installed. This applies for the automatic update as well as for manually installing an extension. The version of the already installed extension does not matter. Suppressing the license can be useful during the online update, because otherwise the update operation could be interrupted by many license dialogs.
+
|可选。当没有提供此属性时此属性值为假设为 “false”。值为 “true” 时表示的是当相同扩展已经安装(相同 id 但可能不同版本)的情况下,此扩展的协议在安装过程中不会再被显示。这同样也作用于自动更新和手动安装扩展。它并不关心已安装扩展的版本。在线升级时排除授权许可对相当有用,因为不那样的话更新操作可能会被许许多多的授权许可对话框中断。
 
|}
 
|}
 
  
 
'''也请参阅'''
 
'''也请参阅'''
Line 168: Line 160:
  
 
==== <code>/description/registration/simple-license/license-text</code> 元素====   
 
==== <code>/description/registration/simple-license/license-text</code> 元素====   
 +
 
* 父元素: <code>[[Zh/Documentation/DevGuide/Extensions/Description of XML Elements#/description/registration/simple-license 元素|<simple-license>]]</code>
 
* 父元素: <code>[[Zh/Documentation/DevGuide/Extensions/Description of XML Elements#/description/registration/simple-license 元素|<simple-license>]]</code>
 
* 子元素: 无
 
* 子元素: 无
 
* 始用于: OOo 2.0.4
 
* 始用于: OOo 2.0.4
  
The element contains information about where to find the file containing the license text, which language it uses, and if this element is the “default” <code><license-text></code>. The mechanism for determining a "default" has changed in OOo 2.4. See [[Zh/Documentation/DevGuide/Extensions/Localized XML Elements]] for details.
+
此元素包含以下信息:授权许可文件的位置、使用何种语言和这个元素是否是 “默认"的 <code><license-text></code>。检验 “默认" 的机制在 OOo 2.4 版本做了变更。详见[[Zh/Documentation/DevGuide/Extensions/Localized XML Elements|本地化 XML 元素]]
 
+
  
 
{|border="1" cellpadding=4 style="border-collapse:collapse;"
 
{|border="1" cellpadding=4 style="border-collapse:collapse;"
Line 182: Line 174:
 
|-
 
|-
 
|<code>xlink:href</code>  
 
|<code>xlink:href</code>  
|Required. The value is a relative URL to the license file within the extension.
+
|Required.必需。值为该扩展授权许可文件对应的 URL。
 
|-
 
|-
 
|<code>lang</code>  
 
|<code>lang</code>  
|必需。RFC 3066 标准的语言标识。详见 [[Zh/Documentation/DevGuide/Extensions/Localized XML Elements]]。
+
|必需。遵循 RFC 3066 标准的语言标识。详见 [[Zh/Documentation/DevGuide/Extensions/Localized XML Elements|本地化 XML 元素]]。
 
|-
 
|-
 
|<code>license-id</code>
 
|<code>license-id</code>
|Optional. Since OOo 2.4 this attribute is '''obsolete'''. If the extension should work properly (regarding showing the proper license during installation) on versions prior 2.4 one must use this attribute. If one does not use this attribute then one should use the [[Zh/Documentation/DevGuide/Extensions/Description of XML Elements#/description/dependencies/OpenOffice.org-minimal-version 元素|OpenOffice.org-minimal-version]] dependency with a value of '2.4'.
+
|必需。自 OOo 2.4 版本起,此属性被认为是'''陈旧'''属性。如果扩展需要正确地在 2.4 之前的版本上运行的话(在安装过程中显示正确的授权许可)就必需使用这个属性。如果不使用这个属性那么就应该使用 [[Zh/Documentation/DevGuide/Extensions/Description of XML Elements#/description/dependencies/OpenOffice.org-minimal-version 元素|OpenOffice.org-minimal-version]] 值为 '2.4' 的依赖关系。
One license-text element must have this attribute and the value must match the value of the default-license-id attribute of the <code><simple-license></code> element. The type is <code>xsd:ID</code>.
+
一个 license-text 元素必需有这个属性并且属性值必需与 <code><simple-license></code> 元素的 default-license-id 的值相匹配。值类型为 <code>xsd:ID</code>
 
|}
 
|}
 
  
 
'''也请参阅'''
 
'''也请参阅'''
 
*[[Zh/Documentation/DevGuide/Extensions/Simple License|Simple License]]
 
*[[Zh/Documentation/DevGuide/Extensions/Simple License|Simple License]]
*[[Zh/Documentation/DevGuide/Extensions/Example|Example of description.xml]]
+
*[[Zh/Documentation/DevGuide/Extensions/Example|description.xml 示例]]
 
+
  
  
Line 207: Line 197:
 
** 其他
 
** 其他
 
* 始用于: OOo 2.0.4
 
* 始用于: OOo 2.0.4
 
  
 
'''也请参阅'''
 
'''也请参阅'''
Line 215: Line 204:
  
 
==== <code>/description/dependencies/OpenOffice.org-minimal-version</code> 元素 ====  
 
==== <code>/description/dependencies/OpenOffice.org-minimal-version</code> 元素 ====  
 +
 
* 父元素: <code>[[Zh/Documentation/DevGuide/Extensions/Description of XML Elements#/description/dependencies 元素|<dependencies>]]</code>
 
* 父元素: <code>[[Zh/Documentation/DevGuide/Extensions/Description of XML Elements#/description/dependencies 元素|<dependencies>]]</code>
 
* 子元素: 无
 
* 子元素: 无
 
* 始用于: OOo 2.1
 
* 始用于: OOo 2.1
 
  
 
{|border="1" cellpadding=4 style="border-collapse:collapse;"
 
{|border="1" cellpadding=4 style="border-collapse:collapse;"
Line 227: Line 216:
 
|-
 
|-
 
|<code>xmlns:dep</code>  
 
|<code>xmlns:dep</code>  
|The namespace for dependency information (inherited from <code><description></code>) must be defined as
+
|namespace 用于依赖关系信息(继承自 <code><description></code>)根据 http://openoffice.org/extensions/description/2006 定义。
http://openoffice.org/extensions/description/2006
+
 
|-
 
|-
 
|<code>dep:name</code>
 
|<code>dep:name</code>
|Required. The string “OpenOffice.org value” (where value is the value of the attribute value).
+
|必需。字符串 “OpenOffice.org ''value''” (这里 ''value'' 的值为属性 '''value''' 的值)。
 
|-
 
|-
 
|<code>dep:OpenOffice.org-minimal-version</code>  
 
|<code>dep:OpenOffice.org-minimal-version</code>  
|Optional. This attribute should never be used with this element.
+
|可选。在这个元素里此属性应该永远不会被用到。
 
|-
 
|-
|<code>value</code>  
+
|'''<code>value</code>'''
|Required. The required underlying OpenOffice.org version (“2.1”, “2.2”, etc.), starting with OpenOffice.org 2.1.
+
|必需。OpenOffice.org 的基本版本需求(“2.1”、“2.2”、等等),由 OpenOffice.org 2.1 开始。
 
|}
 
|}
 
  
 
'''也请参阅'''
 
'''也请参阅'''
 
*[[Zh/Documentation/DevGuide/Extensions/Dependencies|依赖关系]]
 
*[[Zh/Documentation/DevGuide/Extensions/Dependencies|依赖关系]]
*[[Zh/Documentation/DevGuide/Extensions/Example|Example of description.xml]]
+
*[[Zh/Documentation/DevGuide/Extensions/Example|description.xml 示例]]
  
  
Line 251: Line 238:
 
* 子元素: 无
 
* 子元素: 无
 
* 始用于: OOo 3.1
 
* 始用于: OOo 3.1
 
  
 
{|border="1" cellpadding=4 style="border-collapse:collapse;"
 
{|border="1" cellpadding=4 style="border-collapse:collapse;"
Line 260: Line 246:
 
|-
 
|-
 
|<code>xmlns:dep</code>  
 
|<code>xmlns:dep</code>  
|The namespace for dependency information (inherited from <code><description></code>) must be defined as
+
|namespace 用于依赖关系信息(继承自 <code><description></code>)根据 http://openoffice.org/extensions/description/2006 定义。
http://openoffice.org/extensions/description/2006
+
 
|-
 
|-
 
|<code>dep:name</code>
 
|<code>dep:name</code>
|Required. The string “OpenOffice.org value or older” (where value is the value of the attribute value).
+
|必需。字符串 “OpenOffice.org ''value''”(这里 ''value'' 的值为属性 '''value''' 的值)。
 
|-
 
|-
 
|<code>dep:OpenOffice.org-minimal-version</code>  
 
|<code>dep:OpenOffice.org-minimal-version</code>  
|Optional. This attribute should always be defined as “2.3” for this element.
+
|可选。在这个元素中的这个属性值总是被定义为 “2.3”。
 
|-
 
|-
|<code>value</code>  
+
|'''<code>value</code>'''
|Required. The required maximal underlying OpenOffice.org version (“3.0”, “3.1”, etc.).
+
|必需。可运行的 OpenOffice.org 的最高版本(“3.0”、“3.2”、等等)。
 
|}
 
|}
 
  
 
'''也请参阅'''
 
'''也请参阅'''
Line 285: Line 269:
 
* 始用于: OOo 2.2
 
* 始用于: OOo 2.2
  
<code><update-information></code> must have at least one <code>[[Zh/Documentation/DevGuide/Extensions/Description of XML Elements#/description/update-information/src 元素|<src>]]</code> child element. The second, third, etc. element are regarded as fallback, that is, the elements provide URLs to mirrors. The Extension Manager will try to get update information by using a URL and only use a different URL if an error occurred. That is, if for example the first URL references an atom feed that does not contain any references at all, but is a valid feed, then the Extension Manager assumes that there are no update information available. Then URLs from other <code><src></code> elements are not examined. Therefore the update information referenced by every URL must be identical.
+
<code><update-information></code> 必需至少有一个 <code>[[Zh/Documentation/DevGuide/Extensions/Description of XML Elements#/description/update-information/src 元素|<src>]]</code> 子元素。第二个、第三个或更多元素被看作备用,也可以说这些元素提供镜像的 URL。扩展管理器会尝试使用一个 URL 来获取更新信息,只有在出错的情况下才会使用另外一个 URL。例如如果的第一个 URL 引用了一个不包含任何引用信息但却是个合法的 ATOM Feed,那么扩展管理器就会假设没有更新。而其他 <code><src></code> 元素就不会在检查了。因此,每个 URL 引用的更新信息都必需一致。
  
 
'''也请参阅'''
 
'''也请参阅'''
Line 296: Line 280:
 
* 子元素: 无
 
* 子元素: 无
 
* 始用于: OOo 2.2
 
* 始用于: OOo 2.2
 
  
 
{|border="1" cellpadding=4 style="border-collapse:collapse;"
 
{|border="1" cellpadding=4 style="border-collapse:collapse;"
Line 305: Line 288:
 
|-
 
|-
 
|<code>xlink:href</code>  
 
|<code>xlink:href</code>  
|Required. The value is a URL which provides the update information directly or an atom feed which in turn references the update information. The URL can point directly to a file or it may invoke code, such as a servlet, cgi, etc, that returns the atom feed or the update information. 
+
|必需。此值为 提供更新信息的 URL 或是一个引用更新信息的 ATOM Feed。此 URL 可以直接指向一个文件或调用代码,比如调用 servlet或cgi等等来返回 ATOM Feed 或者更新信息。
 
|}
 
|}
 
  
 
'''也请参阅'''
 
'''也请参阅'''
Line 322: Line 304:
  
 
<code><publisher></code> 必需至少有一个 <code>[[Zh/Documentation/DevGuide/Extensions/Description of XML Elements#/description/publisher/name 元素|<name>]]</code> 子元素。这个元素的子元素提供一个 [[Zh/Documentation/DevGuide/Extensions/Localized XML Elements|本地化 XML 元素]] 的 URL。  
 
<code><publisher></code> 必需至少有一个 <code>[[Zh/Documentation/DevGuide/Extensions/Description of XML Elements#/description/publisher/name 元素|<name>]]</code> 子元素。这个元素的子元素提供一个 [[Zh/Documentation/DevGuide/Extensions/Localized XML Elements|本地化 XML 元素]] 的 URL。  
 
  
 
'''也请参阅'''
 
'''也请参阅'''
Line 334: Line 315:
 
* 子元素: Text  
 
* 子元素: Text  
 
* 始用于: OOo 2.4
 
* 始用于: OOo 2.4
 
  
 
The text value of this element is the ''publisher name''.
 
The text value of this element is the ''publisher name''.
Line 348: Line 328:
 
|-
 
|-
 
|<code>lang</code>  
 
|<code>lang</code>  
|必需。RFC 3066 标准的语言标识。详见 [[Zh/Documentation/DevGuide/Extensions/Localized XML Elements]]。
+
|必需。遵循 RFC 3066 标准的语言标识。详见 [[Zh/Documentation/DevGuide/Extensions/Localized XML Elements|本地化 XML 元素]]。
 
|}
 
|}
 
  
 
'''也请参阅'''
 
'''也请参阅'''
Line 363: Line 342:
 
* 始用于: OOo 2.4
 
* 始用于: OOo 2.4
  
<code><release-notes></code> must have at least one <code>[[Documentation/DevGuide/Extensions/Description of XML Elements#/description/release-notes/src 元素|<src>]]</code> child element. The children provide URLs to [[Documentation/DevGuide/Extensions/Localized XML Elements|localized release-notes]].
+
<code><release-notes></code> 必需至少有一个 <code>[[Zh/Documentation/DevGuide/Extensions/Description of XML Elements#/description/release-notes/src 元素|<src>]]</code> 子元素。此子元素提供 [[Zh/Documentation/DevGuide/Extensions/Localized XML Elements|本地化 release-notes]] 的 URLs。
  
Currently this element and its children are not used by the Extension Manager.
+
当前此元素和其子元素还没有被用于扩展管理器。
  
 
'''也请参阅'''
 
'''也请参阅'''
Line 372: Line 351:
  
 
==== <code>/description/release-notes/src</code> 元素====
 
==== <code>/description/release-notes/src</code> 元素====
 +
 
* 父元素: <code>[[Zh/Documentation/DevGuide/Extensions/Description of XML Elements#/description/release-notes 元素|<release-notes>]]</code>
 
* 父元素: <code>[[Zh/Documentation/DevGuide/Extensions/Description of XML Elements#/description/release-notes 元素|<release-notes>]]</code>
 
* 子元素: none
 
* 子元素: none
Line 388: Line 368:
 
|-
 
|-
 
|<code>lang</code>  
 
|<code>lang</code>  
|必需。RFC 3066 标准的语言标识。详见 [[Zh/Documentation/DevGuide/Extensions/Localized XML Elements]]。
+
|必需。遵循 RFC 3066 标准的语言标识。详见 [[Zh/Documentation/DevGuide/Extensions/Localized XML Elements|本地化 XML 元素]]。
 
|}
 
|}
 
  
 
'''也请参阅'''
 
'''也请参阅'''
 
*[[Zh/Documentation/DevGuide/Extensions/Example|description.xml 示例]]
 
*[[Zh/Documentation/DevGuide/Extensions/Example|description.xml 示例]]
 
  
 
==== <code>/description/display-name</code> 元素 ====
 
==== <code>/description/display-name</code> 元素 ====
Line 425: Line 403:
 
|-
 
|-
 
|<code>lang</code>  
 
|<code>lang</code>  
|必需。RFC 3066 标准的语言标识。详见 [[Zh/Documentation/DevGuide/Extensions/Localized XML Elements]]。
+
|必需。遵循 RFC 3066 标准的语言标识。详见 [[Zh/Documentation/DevGuide/Extensions/Localized XML Elements|本地化 XML 元素]]。
 
|}
 
|}
 
  
 
'''也请参阅'''
 
'''也请参阅'''
 
*[[Zh/Documentation/DevGuide/Extensions/Display Name|显示名称]]
 
*[[Zh/Documentation/DevGuide/Extensions/Display Name|显示名称]]
 
*[[Zh/Documentation/DevGuide/Extensions/Example|description.xml 示例]]
 
*[[Zh/Documentation/DevGuide/Extensions/Example|description.xml 示例]]
 
  
 
==== <code>/description/icon</code> 元素 ====
 
==== <code>/description/icon</code> 元素 ====
Line 441: Line 417:
 
**<code>[[Zh/Documentation/DevGuide/Extensions/Description of XML Elements#/description/icon/high-contrast 元素|<high-contrast>]]</code>
 
**<code>[[Zh/Documentation/DevGuide/Extensions/Description of XML Elements#/description/icon/high-contrast 元素|<high-contrast>]]</code>
 
* 始用于: OOo 3.0
 
* 始用于: OOo 3.0
 
  
 
'''也请参阅'''
 
'''也请参阅'''
Line 463: Line 438:
 
|值为扩展中图标文件对应的 URL。  
 
|值为扩展中图标文件对应的 URL。  
 
|}
 
|}
 
  
 
'''也请参阅'''
 
'''也请参阅'''
Line 484: Line 458:
 
|值为扩展中图标文件对应的 URL。  
 
|值为扩展中图标文件对应的 URL。  
 
|}
 
|}
 
  
 
'''也请参阅'''
 
'''也请参阅'''
Line 490: Line 463:
  
  
==== Element <code>/description/extension-description</code> 元素====  
+
==== <code>/description/extension-description</code> 元素====  
  
 
* 父元素: <code>[[Documentation/DevGuide/Extensions/Description of XML Elements#/description 元素|<description>]]</code>
 
* 父元素: <code>[[Documentation/DevGuide/Extensions/Description of XML Elements#/description 元素|<description>]]</code>
Line 497: Line 470:
 
* 始用于: OOo 3.1
 
* 始用于: OOo 3.1
  
<extension-description> 必需至少有一个 [[Zh/Documentation/DevGuide/Extensions/Description of XML Elements#/description/extension-description/src 元素|<src>]] 子元素。没个子元素引用一个本地化的说明。详见 [[Zh/Documentation/DevGuide/Extensions/Localized XML Elements]]。
+
<extension-description> 必需至少有一个 [[Zh/Documentation/DevGuide/Extensions/Description of XML Elements#/description/extension-description/src 元素|<src>]] 子元素。没个子元素引用一个本地化的说明。详见 [[Zh/Documentation/DevGuide/Extensions/Localized XML Elements|本地化 XML 元素]]。
 
+
  
 
'''也请参阅'''
 
'''也请参阅'''
 
*[[Zh/Documentation/DevGuide/Extensions/Extension Description|扩展说明]]
 
*[[Zh/Documentation/DevGuide/Extensions/Extension Description|扩展说明]]
 
*[[Zh/Documentation/DevGuide/Extensions/Example|description.xml 示例]]
 
*[[Zh/Documentation/DevGuide/Extensions/Example|description.xml 示例]]
 
  
 
==== <code>/description/extension-description/src</code> 元素 ====   
 
==== <code>/description/extension-description/src</code> 元素 ====   
Line 523: Line 494:
 
|-
 
|-
 
|<code>lang</code>  
 
|<code>lang</code>  
|必需。RFC 3066 标准的语言标识。详见 [[Zh/Documentation/DevGuide/Extensions/Localized XML Elements]]。
+
|必需。遵循 RFC 3066 标准的语言标识。详见 [[Zh/Documentation/DevGuide/Extensions/Localized XML Elements|本地化的 XML 元素]]。
 
|}
 
|}
 
  
 
'''也请参阅'''
 
'''也请参阅'''

Latest revision as of 09:19, 10 September 2008


/description 元素

<description>description.xml 的根元素。

<description> 的属性
属性 说明
xmlns 默认的元素说明和所有子元素必需根据 http://openoffice.org/extensions/description/2006 定义
xmlns:dep 依赖关系信息的 namespace 同样也必需根据 http://openoffice.org/extensions/description/2006 定义
xmlns:xlink xlink namespace 必需根据 http://www.w3.org/1999/xlink 定义
其他 namespace 定义 如需要还可添加其他 namespaces


/description/identifier 元素

<identifier> 的属性
属性 说明
value 必需。扩展标识符。

也请参阅


/description/version 元素

<version> 的属性
属性 说明
value 必需。扩展版本的文字表现形式。

也请参阅


/description/platform 元素

<platform> 的属性
属性 说明
value 必需。为表示特定平台的符号。详见 目标平台

也请参阅


/description/registration 元素

registration 元素当前只包含 <simple-license> 元素。如果 <registration> 元素存在的话,那么它必需包含至少一个子元素。

也请参阅


/description/registration/simple-license 元素

父元素: <registration>

这个元素包含 <license-text> 元素,验证是否所有用户接收这个授权许可对,或只是安装者接收此授权许可对,并且验证默认的 <license-text> 元素。检验 “默认" 的机制在 OOo 2.4 版本做了变更。详见 本地化 XML 元素

如果 <simple-license> 元素存在的话,那么它必需包含至少一个子元素。

<simple-license> 的属性
属性 说明
accept-by 必需。Value 可以是 “user” 或 “admin”。“user” 意味着每个用户必需接受此授权许可对。也就是说,此扩展只能被安装为用户扩展而非共享扩展。如果值为 “admin”,那么扩展才可以被部署为共享扩展。在那种情况下只有安装者才必需接受授权许可对。不需要询问每个用户去接受此授权许可对。他们可以直接使用此扩展。在值为 “user” 时扩展被安装成用户扩展,那么用户都会被询问是否接受此授权许可对。
default-license-id 必需。自 OOo 2.4 版本起,此属性被认为是陈旧属性。如果扩展需要正确地在 2.4 之前的版本上运行的话(在安装过程中显示正确的授权许可)就必需使用这个属性。如果不使用这个属性那么就应该使用 OpenOffice.org-minimal-version 值为 '2.4' 的依赖关系。

这个属性确定如果没有一个 <license-text> 元素的 lang 属性值可以与 OpenOffice.org 的安装地域相匹配时使用什么 <license-text>。任何时候只有一个带 license-id 属性的 <license-text> 元素。license-id 值与 default-license-id 相匹配,类型为 xsd:IDREF

suppress-on-update 可选。当没有提供此属性时此属性值为假设为 “false”。值为 “true” 时表示的是当相同扩展已经安装(相同 id 但可能不同版本)的情况下,此扩展的协议在安装过程中不会再被显示。这同样也作用于自动更新和手动安装扩展。它并不关心已安装扩展的版本。在线升级时排除授权许可对相当有用,因为不那样的话更新操作可能会被许许多多的授权许可对话框中断。

也请参阅


/description/registration/simple-license/license-text 元素

此元素包含以下信息:授权许可文件的位置、使用何种语言和这个元素是否是 “默认"的 <license-text>。检验 “默认" 的机制在 OOo 2.4 版本做了变更。详见本地化 XML 元素

<license-text> 的属性
属性 说明
xlink:href Required.必需。值为该扩展授权许可文件对应的 URL。
lang 必需。遵循 RFC 3066 标准的语言标识。详见 本地化 XML 元素
license-id 必需。自 OOo 2.4 版本起,此属性被认为是陈旧属性。如果扩展需要正确地在 2.4 之前的版本上运行的话(在安装过程中显示正确的授权许可)就必需使用这个属性。如果不使用这个属性那么就应该使用 OpenOffice.org-minimal-version 值为 '2.4' 的依赖关系。

一个 license-text 元素必需有这个属性并且属性值必需与 <simple-license> 元素的 default-license-id 的值相匹配。值类型为 xsd:ID

也请参阅


/description/dependencies 元素

也请参阅


/description/dependencies/OpenOffice.org-minimal-version 元素

<OpenOffice.org-minimal-version> 的属性
属性 说明
xmlns:dep 此 namespace 用于依赖关系信息(继承自 <description>)根据 http://openoffice.org/extensions/description/2006 定义。
dep:name 必需。字符串 “OpenOffice.org value” (这里 value 的值为属性 value 的值)。
dep:OpenOffice.org-minimal-version 可选。在这个元素里此属性应该永远不会被用到。
value 必需。OpenOffice.org 的基本版本需求(“2.1”、“2.2”、等等),由 OpenOffice.org 2.1 开始。

也请参阅


/description/dependencies/OpenOffice.org-maximal-version 元素

<OpenOffice.org-maximal-version> 的属性
属性 说明
xmlns:dep 此 namespace 用于依赖关系信息(继承自 <description>)根据 http://openoffice.org/extensions/description/2006 定义。
dep:name 必需。字符串 “OpenOffice.org value”(这里 value 的值为属性 value 的值)。
dep:OpenOffice.org-minimal-version 可选。在这个元素中的这个属性值总是被定义为 “2.3”。
value 必需。可运行的 OpenOffice.org 的最高版本(“3.0”、“3.2”、等等)。

也请参阅


/description/update-information 元素

<update-information> 必需至少有一个 <src> 子元素。第二个、第三个或更多元素被看作备用,也可以说这些元素提供镜像的 URL。扩展管理器会尝试使用一个 URL 来获取更新信息,只有在出错的情况下才会使用另外一个 URL。例如如果的第一个 URL 引用了一个不包含任何引用信息但却是个合法的 ATOM Feed,那么扩展管理器就会假设没有更新。而其他 <src> 元素就不会在检查了。因此,每个 URL 引用的更新信息都必需一致。

也请参阅

/description/update-information/src 元素

<src> 的属性
属性 说明
xlink:href 必需。此值为 提供更新信息的 URL 或是一个引用更新信息的 ATOM Feed。此 URL 可以直接指向一个文件或调用代码,比如调用 servlet或cgi等等来返回 ATOM Feed 或者更新信息。

也请参阅


/description/publisher 元素

<publisher> 必需至少有一个 <name> 子元素。这个元素的子元素提供一个 本地化 XML 元素 的 URL。

也请参阅


/description/publisher/name 元素

  • 父元素: <publisher>
  • 子元素: Text
  • 始用于: OOo 2.4

The text value of this element is the publisher name.

<name> 的属性
属性 说明
xlink:href 必需。值为扩展中发行者的 Web 站点的 URL。
lang 必需。遵循 RFC 3066 标准的语言标识。详见 本地化 XML 元素

也请参阅


/description/release-notes 元素

<release-notes> 必需至少有一个 <src> 子元素。此子元素提供 本地化 release-notes 的 URLs。

当前此元素和其子元素还没有被用于扩展管理器。

也请参阅


/description/release-notes/src 元素

The element contains a URL to the release notes.

<src> 的属性
属性 说明
xlink:href 必需。值为扩展中发行注释的 URL。
lang 必需。遵循 RFC 3066 标准的语言标识。详见 本地化 XML 元素

也请参阅

/description/display-name 元素

<display-name> 必须至少有一个 <name> 子元素。这个元素的子元素提供一个 本地化的显示名称。这个名称将会用在用户图形界面上来替换文件的名称。

也请参阅


/description/display-name/name 元素

这个元素的文本为扩展的显示名称 值。字符串长度必须大于零并且不能只包含空格字符。

<name> 的属性
属性 说明
lang 必需。遵循 RFC 3066 标准的语言标识。详见 本地化 XML 元素

也请参阅

/description/icon 元素

也请参阅


/description/icon/default 元素

  • 父元素: <icon>
  • 子元素: 无
  • 始用于: OOo 3.0
<default> 的属性
属性 说明
xlink:href 值为扩展中图标文件对应的 URL。

也请参阅


/description/icon/high-contrast 元素

  • 父元素: <icon>
  • 子元素: 无
  • 始用于: OOo 3.0
<high-contrast> 的属性
属性 说明
xlink:href 值为扩展中图标文件对应的 URL。

也请参阅


/description/extension-description 元素

<extension-description> 必需至少有一个 <src> 子元素。没个子元素引用一个本地化的说明。详见 本地化 XML 元素

也请参阅

/description/extension-description/src 元素

这个元素包含如何寻找含有说明文本的文件以及它使用何种语言的相关信息。

<license-text> 的属性
属性 说明
xlink:href 必需。值为扩展内说明文件对应的 URL。
lang 必需。遵循 RFC 3066 标准的语言标识。详见 本地化的 XML 元素

也请参阅


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