XML 元素说明

From Apache OpenOffice Wiki
< Zh‎ | Documentation
Revision as of 06:39, 10 September 2008 by Jirong (Talk | contribs)

Jump to: navigation, search


/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 元素

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” <license-text>. The mechanism for determining a "default" has changed in OOo 2.4. See Zh/Documentation/DevGuide/Extensions/Localized XML Elements for details.


<license-text> 的属性
属性 说明
xlink:href Required. The value is a relative URL to the license file within the extension.
lang 必需。RFC 3066 标准的语言标识。详见 Zh/Documentation/DevGuide/Extensions/Localized XML Elements
license-id 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 OpenOffice.org-minimal-version dependency with a value of '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 <simple-license> element. The type is xsd:ID.


也请参阅


/description/dependencies 元素


也请参阅


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


<OpenOffice.org-minimal-version> 的属性
属性 说明
xmlns:dep The namespace for dependency information (inherited from <description>) must be defined as

http://openoffice.org/extensions/description/2006

dep:name Required. The string “OpenOffice.org value” (where value is the value of the attribute value).
dep:OpenOffice.org-minimal-version Optional. This attribute should never be used with this element.
value Required. The required underlying OpenOffice.org version (“2.1”, “2.2”, etc.), starting with OpenOffice.org 2.1.


也请参阅


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


<OpenOffice.org-maximal-version> 的属性
属性 说明
xmlns:dep The namespace for dependency information (inherited from <description>) must be defined as

http://openoffice.org/extensions/description/2006

dep:name Required. The string “OpenOffice.org value or older” (where value is the value of the attribute value).
dep:OpenOffice.org-minimal-version Optional. This attribute should always be defined as “2.3” for this element.
value Required. The required maximal underlying OpenOffice.org version (“3.0”, “3.1”, etc.).


也请参阅


/description/update-information 元素

<update-information> must have at least one <src> 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 <src> elements are not examined. Therefore the update information referenced by every URL must be identical.

也请参阅

/description/update-information/src 元素


<src> 的属性
属性 说明
xlink:href 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.


也请参阅


/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 标准的语言标识。详见 Zh/Documentation/DevGuide/Extensions/Localized XML Elements


也请参阅


/description/release-notes 元素

<release-notes> must have at least one <src> child element. The children provide URLs to localized release-notes.

Currently this element and its children are not used by the Extension Manager.

也请参阅


/description/release-notes/src 元素

The element contains a URL to the release notes.

<src> 的属性
属性 说明
xlink:href 必需。值为扩展中发行注释的 URL。
lang 必需。RFC 3066 标准的语言标识。详见 Zh/Documentation/DevGuide/Extensions/Localized XML Elements


也请参阅


/description/display-name 元素

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

也请参阅


/description/display-name/name 元素

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

<name> 的属性
属性 说明
lang 必需。RFC 3066 标准的语言标识。详见 Zh/Documentation/DevGuide/Extensions/Localized XML Elements


也请参阅


/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> 子元素。没个子元素引用一个本地化的说明。详见 Zh/Documentation/DevGuide/Extensions/Localized XML Elements


也请参阅

/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