示例
From Apache OpenOffice Wiki
< Zh | Documentation
<?xml version="1.0" encoding="UTF-8"?>
<description xmlns="http://openoffice.org/extensions/description/2006"
xmlns:d="http://openoffice.org/extensions/description/2006"
xmlns:xlink="http://www.w3.org/1999/xlink">
<version value="1.0" />
<identifier value="com.mycompany.extensions.my_extension" />
<platform value="windows_x86,solaris_sparc" />
<dependencies>
<OpenOffice.org-minimal-version value="2.2" d:name="OpenOffice.org 2.2"/>
</dependencies>
<update-information>
<src xlink:href="http://extensions.openoffice.org/testarea/desktop/license/update/lic3.update.xml" />
</update-information>
<registration>
<simple-license accept-by="admin" suppress-on-update="true" >
<license-text xlink:href="registration/license_de-DE.txt" lang="de-DE" />
<license-text xlink:href="registration/license_en-GB.txt" lang="en-GB" />
<license-text xlink:href="registration/license_en-NZ.txt" lang="en-NZ" />
<license-text xlink:href="registration/license_en-US.txt" lang="en-US" />
</simple-license>
</registration>
<publisher>
<name xlink:href="http://extensions.openoffice.org/testarea/desktop/publisher/publisher_de.html"
lang="de">My OpenOffice de</name>
<name xlink:href="http://extensions.openoffice.org/testarea/desktop/publisher/publisher_en.html"
lang="en">My OpenOffice en</name>
</publisher>
<release-notes>
<src xlink:href="http://extensions.openoffice.org/testarea/desktop/publisher/release-notes_de.txt" lang="de" />
<src xlink:href="http://extensions.openoffice.org/testarea/desktop/publisher/release-notes_en.txt" lang="en" />
</release-notes>
<display-name>
<name lang="de">Meine tolle extensions</name>
<name lang="en">My great extension</name>
</display-name>
<icon>
<default xlink:href="images/icon.png" />
<high-contrast xlink:href="images/icon_hc.png" />
</icon>
<extension-description>
<src xlink:href="description/desc_de.txt" lang="de" />
<src xlink:href="description/desc_en.txt" lang="en" />
</extension-description>
</description>
这个 description.xml 包含以下信息:
- 扩展版本(version) 为 1.0。[查阅 XML 元素说明].
- 扩展标识符(identifier) 为:com.mycompany.extensions.my_extension。[查阅 XML 元素说明]
- 目标平台(platforms) 设置为 Windows (x86 CPU) 和 Solaris (SPARC CPU),说明只可安装在这两个平台上。[查阅 XML 元素说明]
- 依赖关系(dependency) 需求为 OpenOffice.org 2.2 和更高版本。也就是说,扩展工作的最低版本为 2.2。[查阅 XML 元素说明]
- 支持 在线更新扩展(update) 功能和更新信息可由指定地址获得。[查阅 XML 元素说明]
- 授权许可(license) 文本在安装过程中显示。可以提供各种本地化的授权许可文本。 [查阅 XML 元素说明]
- 这里有两个版本的 发行者名称(publisher name) 和 URL. [查阅 XML 元素说明]
- 这里有两处指向不同语言的 发行注释(release notes) 的链接。 [查阅 XML 元素说明]
- 本地化的 显示名称(display name)。在英文版本的 OOo 扩展管理器将显示 My great extension 字符串。 [查阅 XML 元素说明]
- 此扩展包含 图标(icons),用于在扩展管理器中表示此扩展。[查阅 XML 元素说明]
- 扩展管理器对话框中显示本地化的 扩展说明(description)。[查阅 XML 元素说明]
请留意 description.xml 中的 <publisher> 和 <release-notes> 元素,它们现在还未被扩展管理器使用。无论如何,当上传扩展至扩展存储仓库(http://extensions.services.openoffice.org) 时仍需要这些元素以产生更新信息。当扩展管理器查询更新时将会显示这些信息(OOo 2.4)。
| Content on this page is licensed under the Public Documentation License (PDL). |