XML 元素说明

From Apache OpenOffice Wiki
< Zh‎ | Documentation
Revision as of 09:27, 9 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,或只是安装者接收此 license,并且验证默认的 <license-text> 元素。在 OOo 2.4 版本中,这个验证“默认”的机制已被修改。详见 Zh/Documentation/DevGuide/Extensions/Localized XML Elements


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

<simple-license> 的属性
属性 说明
accept-by Required.Value 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.
default-license-id 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 OpenOffice.org-minimal-version dependency with a value of '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 OpenOffice.org. There must always be exactly one <license-text> element with a license-id attribute whose value matches that of the default-license-id. The type is xsd:IDREF.

suppress-on-update 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.


也请参阅


/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。


也请参阅


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


也请参阅


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