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

From Apache OpenOffice Wiki
Jump to: navigation, search
(New page: {{Documentation/DevGuide/ExtensionsTOC |Extensions2b=block |ShowPrevNext=block |PrevPage=Documentation/DevGuide/Extensions/description.xml |NextPage=Documentation/DevGuide/Extensions/Local...)
 
m
Line 51: Line 51:
 
==== <code>/description/identifier</code> 元素 ====
 
==== <code>/description/identifier</code> 元素 ====
  
* 父元素: <code>[[Documentation/DevGuide/Extensions/Description of XML Elements#Element /description|<description>]]</code>
+
* 父元素: <code>[[Zh/Documentation/DevGuide/Extensions/Description of XML Elements#Element /description|<description>]]</code>
 
* 子元素: 无
 
* 子元素: 无
 
*始用于:OOo 2.2
 
*始用于:OOo 2.2
Line 74: Line 74:
 
==== <code>/description/version</code> 元素====
 
==== <code>/description/version</code> 元素====
  
*父元素: <code>[[Documentation/DevGuide/Extensions/Description of XML Elements#Element /description|<description>]]</code>
+
*父元素: <code>[[Zh/Documentation/DevGuide/Extensions/Description of XML Elements#Element /description|<description>]]</code>
 
*子元素: 无
 
*子元素: 无
 
*始用于: OOo 2.1
 
*始用于: OOo 2.1
Line 97: Line 97:
 
==== <code>/description/platform</code> 元素====
 
==== <code>/description/platform</code> 元素====
  
*父元素: <code>[[Documentation/DevGuide/Extensions/Description of XML Elements#Element /description|<description>]]</code>
+
*父元素: <code>[[Zh/Documentation/DevGuide/Extensions/Description of XML Elements#Element /description|<description>]]</code>
 
*子元素: 无
 
*子元素: 无
 
*始用于: OOo 3.0
 
*始用于: OOo 3.0
Line 109: Line 109:
 
|-
 
|-
 
|<code>value</code>  
 
|<code>value</code>  
|必需。为表示特定平台的符号。详见 [[Zh/Documentation/DevGuide/Extensions/Target Platform|Target Platform]]。
+
|必需。为表示特定平台的符号。详见 [[Zh/Documentation/DevGuide/Extensions/Target Platform|目标平台]]。
 
|}
 
|}
  
Line 120: Line 120:
 
==== <code>/description/registration</code> 元素 ====  
 
==== <code>/description/registration</code> 元素 ====  
  
* 父元素: <code>[[Documentation/DevGuide/Extensions/Description of XML Elements#Element /description|<description>]]</code>
+
* 父元素: <code>[[Zh/Documentation/DevGuide/Extensions/Description of XML Elements#Element /description|<description>]]</code>
 
* 子元素:
 
* 子元素:
** <code>[[Documentation/DevGuide/Extensions/Description of XML Elements#Element /description/registration/simple-license|<simple-license>]]</code>
+
** <code>[[Zh/Documentation/DevGuide/Extensions/Description of XML Elements#Element /description/registration/simple-license|<simple-license>]]</code>
 
* 始用于:OOo 2.0.4
 
* 始用于:OOo 2.0.4
  
Line 134: Line 134:
 
==== <code>/description/registration/simple-license</code> 元素====  
 
==== <code>/description/registration/simple-license</code> 元素====  
  
父元素: <code>[[Documentation/DevGuide/Extensions/Description of XML Elements#Element /description/registration|<registration>]]</code>
+
父元素: <code>[[Zh/Documentation/DevGuide/Extensions/Description of XML Elements#Element /description/registration|<registration>]]</code>
 
* 子元素:
 
* 子元素:
** <code>[[Documentation/DevGuide/Extensions/Description of XML Elements#Element /description/registration/simple-license/license-text|<license-text>]]</code>
+
** <code>[[Zh/Documentation/DevGuide/Extensions/Description of XML Elements#Element /description/registration/simple-license/license-text|<license-text>]]</code>
 
* 始用于: OOo 2.0.4
 
* 始用于: OOo 2.0.4
  
Line 154: Line 154:
 
|-
 
|-
 
|<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 [[Documentation/DevGuide/Extensions/Description of XML Elements#Element /description/dependencies/OpenOffice.org-minimal-version|OpenOffice.org-minimal-version]] dependency with a value of '2.4'.  
+
|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#Element /description/dependencies/OpenOffice.org-minimal-version|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 {{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>.
 
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>.
 
|-
 
|-
Line 162: Line 162:
  
  
'''See also'''
+
'''也请参阅'''
*[[Documentation/DevGuide/Extensions/Simple License|Simple License]]
+
*[[Zh/Documentation/DevGuide/Extensions/Simple License|Simple License]]
*[[Documentation/DevGuide/Extensions/Example|Example of description.xml]]
+
*[[Zh/Documentation/DevGuide/Extensions/Example|description.xml 示例]]
  
  
==== Element <code>/description/registration/simple-license/license-text</code> ====   
+
==== <code>/description/registration/simple-license/license-text</code> 元素====   
* Parent: <code>[[Documentation/DevGuide/Extensions/Description of XML Elements#Element /description/registration/simple-license|<simple-license>]]</code>
+
* 父元素: <code>[[Zh/Documentation/DevGuide/Extensions/Description of XML Elements#Element /description/registration/simple-license|<simple-license>]]</code>
* Child elements: none
+
* 子元素:
* Since: 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 [[Documentation/DevGuide/Extensions/Localized XML Elements]] for details.
+
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.
  
  
 
{|border="1" cellpadding=4 style="border-collapse:collapse;"
 
{|border="1" cellpadding=4 style="border-collapse:collapse;"
 
|-bgcolor=#EDEDED
 
|-bgcolor=#EDEDED
|+ Attributes of <code><license-text></code>
+
|+ <code><license-text></code> 的属性
!Attribute
+
!属性
!Description
+
!说明
 
|-
 
|-
 
|<code>xlink:href</code>  
 
|<code>xlink:href</code>  
Line 188: Line 188:
 
|-
 
|-
 
|<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 [[Documentation/DevGuide/Extensions/Description of XML Elements#Element /description/dependencies/OpenOffice.org-minimal-version|OpenOffice.org-minimal-version]] dependency with a value of '2.4'.
+
|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#Element /description/dependencies/OpenOffice.org-minimal-version|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 <code><simple-license></code> element. The type is <code>xsd:ID</code>.  
 
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>.  
 
|}
 
|}
  
  
'''See also'''
+
'''也请参阅'''
*[[Documentation/DevGuide/Extensions/Simple License|Simple License]]
+
*[[Zh/Documentation/DevGuide/Extensions/Simple License|Simple License]]
*[[Documentation/DevGuide/Extensions/Example|Example of description.xml]]
+
*[[Zh/Documentation/DevGuide/Extensions/Example|Example of description.xml]]
  
  
  
==== Element <code>/description/dependencies</code> ====  
+
==== <code>/description/dependencies</code> 元素====  
* Parent: <code>[[Documentation/DevGuide/Extensions/Description of XML Elements#Element /description|<description>]]</code>
+
* 父元素: <code>[[Zh/Documentation/DevGuide/Extensions/Description of XML Elements#Element /description|<description>]]</code>
* Children:
+
* 子元素:
** <code>[[Documentation/DevGuide/Extensions/Description of XML Elements#Element /description/dependencies/OpenOffice.org-minimal-version|<OpenOffice.org-minimal-version>]]</code>
+
** <code>[[Zh/Documentation/DevGuide/Extensions/Description of XML Elements#Element /description/dependencies/OpenOffice.org-minimal-version|<OpenOffice.org-minimal-version>]]</code>
** <code>[[Documentation/DevGuide/Extensions/Description of XML Elements#Element /description/dependencies/OpenOffice.org-maximal-version|<OpenOffice.org-maximal-version>]]</code>
+
** <code>[[Zh/Documentation/DevGuide/Extensions/Description of XML Elements#Element /description/dependencies/OpenOffice.org-maximal-version|<OpenOffice.org-maximal-version>]]</code>
** others
+
** 其他
* Since: OOo 2.0.4
+
* 始用于: OOo 2.0.4
  
  
'''See also'''
+
'''也请参阅'''
*[[Documentation/DevGuide/Extensions/Dependencies|Dependencies]]
+
*[[Zh/Documentation/DevGuide/Extensions/Dependencies|Dependencies]]
*[[Documentation/DevGuide/Extensions/Example|Example of description.xml]]
+
*[[Zh/Documentation/DevGuide/Extensions/Example|description.xml 示例]]
  
  
 
+
==== <code>/description/dependencies/OpenOffice.org-minimal-version</code> 元素 ====  
==== Element <code>/description/dependencies/OpenOffice.org-minimal-version</code> ====  
+
* 父元素: <code>[[Zh/Documentation/DevGuide/Extensions/Description of XML Elements#Element /description/dependencies|<dependencies>]]</code>
* Parent: <code>[[Documentation/DevGuide/Extensions/Description of XML Elements#Element /description/dependencies|<dependencies>]]</code>
+
* 子元素:
* Children: none
+
* 始用于: OOo 2.1
* Since: OOo 2.1
+
  
  
 
{|border="1" cellpadding=4 style="border-collapse:collapse;"
 
{|border="1" cellpadding=4 style="border-collapse:collapse;"
 
|-bgcolor=#EDEDED
 
|-bgcolor=#EDEDED
|+ Attributes of <code><OpenOffice.org-minimal-version></code>
+
|+ <code><OpenOffice.org-minimal-version></code> 的属性
!Attribute
+
!属性
!Description
+
!说明
 
|-
 
|-
 
|<code>xmlns:dep</code>  
 
|<code>xmlns:dep</code>  
Line 241: Line 240:
  
  
'''See also'''
+
'''也请参阅'''
*[[Documentation/DevGuide/Extensions/Dependencies|Dependencies]]
+
*[[Zh/Documentation/DevGuide/Extensions/Dependencies|依赖关系]]
*[[Documentation/DevGuide/Extensions/Example|Example of description.xml]]
+
*[[Zh/Documentation/DevGuide/Extensions/Example|Example of description.xml]]
  
  
==== Element <code>/description/dependencies/OpenOffice.org-maximal-version</code> ====
+
==== <code>/description/dependencies/OpenOffice.org-maximal-version</code> 元素 ====
* Parent: <code>[[Documentation/DevGuide/Extensions/Description of XML Elements#Element /description/dependencies|<dependencies>]]</code>
+
 
* Children: none
+
* 父元素: <code>[[Zh/Documentation/DevGuide/Extensions/Description of XML Elements#Element /description/dependencies|<dependencies>]]</code>
* Since: OOo 3.1
+
* 子元素:
 +
* 始用于: OOo 3.1
  
  
 
{|border="1" cellpadding=4 style="border-collapse:collapse;"
 
{|border="1" cellpadding=4 style="border-collapse:collapse;"
 
|-bgcolor=#EDEDED
 
|-bgcolor=#EDEDED
|+ Attributes of <code><OpenOffice.org-maximal-version></code>
+
|+ <code><OpenOffice.org-maximal-version></code> 的属性
!Attribute
+
!属性
!Description
+
!说明
 
|-
 
|-
 
|<code>xmlns:dep</code>  
 
|<code>xmlns:dep</code>  
Line 273: Line 273:
  
  
'''See also'''
+
'''也请参阅'''
*[[Documentation/DevGuide/Extensions/Dependencies|Dependencies]]
+
*[[Zh/Documentation/DevGuide/Extensions/Dependencies|依赖关系]]
  
  
==== Element <code>/description/update-information</code> ====  
+
==== <code>/description/update-information</code> 元素 ====  
* Parent: <code>[[Documentation/DevGuide/Extensions/Description of XML Elements#Element /description|<description>]]</code>
+
* Children:
+
** <code>[[Documentation/DevGuide/Extensions/Description of XML Elements#Element /description/update-information/src|<src>]]</code>
+
* Since: OOo 2.2
+
  
<code><update-information></code> must have at least one <code>[[Documentation/DevGuide/Extensions/Description of XML Elements#Element /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>[[Zh/Documentation/DevGuide/Extensions/Description of XML Elements#Element /description|<description>]]</code>
 +
* 子元素:
 +
** <code>[[Zh/Documentation/DevGuide/Extensions/Description of XML Elements#Element /description/update-information/src|<src>]]</code>
 +
* 始用于: OOo 2.2
  
'''See also'''
+
<code><update-information></code> must have at least one <code>[[Zh/Documentation/DevGuide/Extensions/Description of XML Elements#Element /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.
*[[Documentation/DevGuide/Extensions/Online Update of Extensions|Online Update of Extensions]]
+
*[[Documentation/DevGuide/Extensions/Example|Example of description.xml]]
+
  
 +
'''也请参阅'''
 +
*[[Zh/Documentation/DevGuide/Extensions/Online Update of Extensions|扩展的在线更行]]
 +
*[[Zh/Documentation/DevGuide/Extensions/Example|description.xml 示例]]
  
==== Element <code>/description/update-information/src</code> ====  
+
 
* Parent: <code>[[Documentation/DevGuide/Extensions/Description of XML Elements#Element /description/update-information|<update-information>]]</code>
+
==== <code>/description/update-information/src</code> 元素 ====  
* Children: none
+
 
* Since: OOo 2.2
+
* 父元素: <code>[[Zh/Documentation/DevGuide/Extensions/Description of XML Elements#Element /description/update-information|<update-information>]]</code>
 +
* 子元素:
 +
* 始用于: OOo 2.2
  
  
 
{|border="1" cellpadding=4 style="border-collapse:collapse;"
 
{|border="1" cellpadding=4 style="border-collapse:collapse;"
 
|-bgcolor=#EDEDED
 
|-bgcolor=#EDEDED
|+ Attributes of <code><src></code>
+
|+ <code><src></code> 的属性
!Attribute
+
!属性
!Description
+
!说明
 
|-
 
|-
 
|<code>xlink:href</code>  
 
|<code>xlink:href</code>  
Line 307: Line 309:
  
  
'''See also'''
+
'''也请参阅'''
*[[Documentation/DevGuide/Extensions/Online Update of Extensions|Online Update of Extensions]]
+
*[[Zh/Documentation/DevGuide/Extensions/Online Update of Extensions|扩展的在线更新]]
*[[Documentation/DevGuide/Extensions/Example|Example of description.xml]]
+
*[[Zh/Documentation/DevGuide/Extensions/Example|description.xml 示例]]
 +
 
  
 +
==== <code>/description/publisher</code> 元素 ====
  
==== Element <code>/description/publisher</code> ====
+
* 父元素: <code>[[Zh/Documentation/DevGuide/Extensions/Description of XML Elements#Element /description|<description>]]</code>
* Parent: <code>[[Documentation/DevGuide/Extensions/Description of XML Elements#Element /description|<description>]]</code>
+
* 子元素:  
* Children:  
+
**<code>[[Zh/Documentation/DevGuide/Extensions/Description of XML Elements#Element /description/publisher/name|<name>]]</code>
**<code>[[Documentation/DevGuide/Extensions/Description of XML Elements#Element /description/publisher/name|<name>]]</code>
+
* 始用于: OOo 2.4
* Since: OOo 2.4
+
  
 
<code><publisher></code> must have at least one <code>[[Documentation/DevGuide/Extensions/Description of XML Elements#Element /description/publisher/name|<name>]]</code> child element. The children of this element provide a [[Documentation/DevGuide/Extensions/Localized XML Elements|localized publisher name]] together with a URL.  
 
<code><publisher></code> must have at least one <code>[[Documentation/DevGuide/Extensions/Description of XML Elements#Element /description/publisher/name|<name>]]</code> child element. The children of this element provide a [[Documentation/DevGuide/Extensions/Localized XML Elements|localized publisher name]] together with a URL.  
  
  
'''See also'''
+
'''也请参阅'''
*[[Documentation/DevGuide/Extensions/Publisher Information|Publisher Information]]
+
*[[Zh/Documentation/DevGuide/Extensions/Publisher Information|发行者信息]]
*[[Documentation/DevGuide/Extensions/Example|Example of description.xml]]
+
*[[Zh/Documentation/DevGuide/Extensions/Example|description.xml 的示例]]
  
  
==== Element <code>/description/publisher/name</code> ====
+
==== <code>/description/publisher/name</code> 元素====
* Parent: <code>[[Documentation/DevGuide/Extensions/Description of XML Elements#Element /description/publisher|<publisher>]]</code>
+
* Children: Text
+
* Since: OOo 2.4
+
  
The text value of this element is the ''publisher name''.
+
* 父元素: <code>[[Zh/Documentation/DevGuide/Extensions/Description of XML Elements#Element /description/publisher|<publisher>]]</code>
 +
* 子元素: Text
 +
* 始用于: OOo 2.4
  
 +
 +
The text value of this element is the ''publisher name''.
  
 
{|border="1" cellpadding=4 style="border-collapse:collapse;"
 
{|border="1" cellpadding=4 style="border-collapse:collapse;"
 
|-bgcolor=#EDEDED
 
|-bgcolor=#EDEDED
|+ Attributes of <code><name></code>
+
|+ <code><name></code> 的属性
!Attribute
+
!属性
!Description
+
!说明
 
|-
 
|-
 
|<code>xlink:href</code>  
 
|<code>xlink:href</code>  
Line 348: Line 352:
  
  
'''See also'''
+
'''也请参阅'''
*[[Documentation/DevGuide/Extensions/Publisher Information|Publisher Information]]
+
*[[Zh/Documentation/DevGuide/Extensions/Publisher Information|发行者信息]]
*[[Documentation/DevGuide/Extensions/Example|Example of description.xml]]
+
*[[Zh/Documentation/DevGuide/Extensions/Example|description.xml 的示例]]
  
  
==== Element <code>/description/release-notes</code> ====
+
==== <code>/description/release-notes</code> 元素 ====
* Parent: <code>[[Documentation/DevGuide/Extensions/Description of XML Elements#Element /description|<description>]]</code>
+
* 父元素: <code>[[Documentation/DevGuide/Extensions/Description of XML Elements#Element /description|<description>]]</code>
* Children:  
+
* 子元素:  
**<code>[[Documentation/DevGuide/Extensions/Description of XML Elements#Element /description/release-notes/src|<src>]]</code>
+
**<code>[[Zh/Documentation/DevGuide/Extensions/Description of XML Elements#Element /description/release-notes/src|<src>]]</code>
* Since: OOo 2.4
+
* 始用于: OOo 2.4
  
 
<code><release-notes></code> must have at least one <code>[[Documentation/DevGuide/Extensions/Description of XML Elements#Element /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> must have at least one <code>[[Documentation/DevGuide/Extensions/Description of XML Elements#Element /description/release-notes/src|<src>]]</code> child element. The children provide URLs to [[Documentation/DevGuide/Extensions/Localized XML Elements|localized release-notes]].  
Line 363: Line 367:
 
Currently this element and its children are not used by the Extension Manager.
 
Currently this element and its children are not used by the Extension Manager.
  
'''See also'''
+
'''也请参阅'''
*[[Documentation/DevGuide/Extensions/Example|Example of description.xml]]
+
*[[Zh/Documentation/DevGuide/Extensions/Example|description.xml 示例]]
  
  
==== Element <code>/description/release-notes/src</code> ====
+
==== <code>/description/release-notes/src</code> 元素====
* Parent: <code>[[Documentation/DevGuide/Extensions/Description of XML Elements#Element /description/release-notes|<release-notes>]]</code>
+
* 父元素: <code>[[Zh/Documentation/DevGuide/Extensions/Description of XML Elements#Element /description/release-notes|<release-notes>]]</code>
* Children: none
+
* 子元素: none
* Since: OOo 2.4
+
* 始用于: OOo 2.4
  
 
The element contains a URL to the ''release notes''.
 
The element contains a URL to the ''release notes''.
 
  
 
{|border="1" cellpadding=4 style="border-collapse:collapse;"
 
{|border="1" cellpadding=4 style="border-collapse:collapse;"
 
|-bgcolor=#EDEDED
 
|-bgcolor=#EDEDED
|+ Attributes of <code><src></code>
+
|+ <code><src></code> 的属性
!Attribute
+
!属性
!Description
+
!说明
 
|-
 
|-
 
|<code>xlink:href</code>  
 
|<code>xlink:href</code>  
Line 385: Line 388:
 
|-
 
|-
 
|<code>lang</code>  
 
|<code>lang</code>  
|Required. A language identifier according to RFC 3066. See also [[Documentation/DevGuide/Extensions/Localized XML Elements]].
+
|Required. A language identifier according to RFC 3066. See also [[Zh/Documentation/DevGuide/Extensions/Localized XML Elements]].
 
|}
 
|}
  
  
'''See also'''
+
'''也请参阅'''
*[[Documentation/DevGuide/Extensions/Example|Example of description.xml]]
+
*[[Zh/Documentation/DevGuide/Extensions/Example|description.xml 示例]]
  
  
==== Element <code>/description/display-name</code> ====
+
==== <code>/description/display-name</code> 元素 ====
* Parent: <code>[[Documentation/DevGuide/Extensions/Description of XML Elements#Element /description|<description>]]</code>
+
* Children:
+
**<code>[[Documentation/DevGuide/Extensions/Description of XML Elements#Element /description/display-name/name|<name>]]</code>
+
* Since: OOo 2.4
+
  
<code><display-name></code> must have at least one <code>[[Documentation/DevGuide/Extensions/Description of XML Elements#Element /description/display-name/name|<name>]]</code> child element. The children of this element provide a [[Documentation/DevGuide/Extensions/Localized XML Elements|localized display name]]. The name will be used in the GUI instead of the file name.
+
* 父元素: <code>[[Zh/Documentation/DevGuide/Extensions/Description of XML Elements#Element /description|<description>]]</code>
 +
* 子元素:
 +
**<code>[[Zh/Documentation/DevGuide/Extensions/Description of XML Elements#Element /description/display-name/name|<name>]]</code>
 +
* 始用于: OOo 2.4
  
'''See also'''
+
<code><display-name></code> 必须至少有一个 <code>[[Zh/Documentation/DevGuide/Extensions/Description of XML Elements#Element /description/display-name/name|<name>]]</code> 子元素。这个元素的子元素提供一个 [[Zh/Documentation/DevGuide/Extensions/Localized XML Elements|本地化的显示名称]]。这个名称将会用在用户图形界面上来替换文件的名称。
*[[Documentation/DevGuide/Extensions/Display Name|Display Name]]
+
*[[Documentation/DevGuide/Extensions/Example|Example of description.xml]]
+
  
 +
'''也请参阅'''
 +
*[[Zh/Documentation/DevGuide/Extensions/Display Name|显示名称]]
 +
*[[Zh/Documentation/DevGuide/Extensions/Example|description.xml 示例]]
  
==== Element <code>/description/display-name/name</code> ====
 
* Parent: <code>[[Documentation/DevGuide/Extensions/Description of XML Elements#Element /description/display-name|<display-name>]]</code>
 
* Children: Text
 
* Since: OOo 2.4
 
  
The text value of this element is the ''display name'' of the extension. The string length must be greater then null and must not only contain white space characters.
+
==== <code>/description/display-name/name</code> 元素 ====
  
 +
* 父元素: <code>[[Zh/Documentation/DevGuide/Extensions/Description of XML Elements#Element /description/display-name|<display-name>]]</code>
 +
* 子元素: Text
 +
* 始用于: OOo 2.4
 +
 +
这个元素的文本为扩展的''显示名称'' 值。字符串长度必须大于零并且不能只包含空格字符。
  
 
{|border="1" cellpadding=4 style="border-collapse:collapse;"
 
{|border="1" cellpadding=4 style="border-collapse:collapse;"
 
|-bgcolor=#EDEDED
 
|-bgcolor=#EDEDED
|+ Attributes of <code><name></code> ||  
+
|+ <code><name></code> 的属性||  
!Attribute
+
!属性
!Description
+
!说明
 
|-
 
|-
 
|<code>lang</code>  
 
|<code>lang</code>  
|Required. A language identifier according to RFC 3066. See also [[Documentation/DevGuide/Extensions/Localized XML Elements]].
+
|必需。RFC 3066 标准的语言标识。详见 [[Zh/Documentation/DevGuide/Extensions/Localized XML Elements]]
 
|}
 
|}
  
  
'''See also'''
+
'''也请参阅'''
*[[Documentation/DevGuide/Extensions/Display Name|Display Name]]
+
*[[Zh/Documentation/DevGuide/Extensions/Display Name|显示名称]]
*[[Documentation/DevGuide/Extensions/Example|Example of description.xml]]
+
*[[Zh/Documentation/DevGuide/Extensions/Example|description.xml 示例]]
  
  
==== Element <code>/description/icon</code> ====
+
==== <code>/description/icon</code> 元素 ====
* Parent: <code>[[Documentation/DevGuide/Extensions/Description of XML Elements#Element /description|<description>]]</code>
+
* Children:
+
**<code>[[Documentation/DevGuide/Extensions/Description of XML Elements#Element /description/icon/default|<default>]]</code>
+
**<code>[[Documentation/DevGuide/Extensions/Description of XML Elements#Element /description/icon/high-contrast|<high-contrast>]]</code>
+
* Since: OOo 3.0
+
  
 +
* 父元素: <code>[[Zh/Documentation/DevGuide/Extensions/Description of XML Elements#Element /description|<description>]]</code>
 +
* 子元素:
 +
**<code>[[Zh/Documentation/DevGuide/Extensions/Description of XML Elements#Element /description/icon/default|<default>]]</code>
 +
**<code>[[Zh/Documentation/DevGuide/Extensions/Description of XML Elements#Element /description/icon/high-contrast|<high-contrast>]]</code>
 +
* 始用于: OOo 3.0
  
'''See also'''
 
*[[Documentation/DevGuide/Extensions/Icon|Icon]]
 
*[[Documentation/DevGuide/Extensions/Example|Example of description.xml]]
 
  
==== Element <code>/description/icon/default</code> ====
+
'''也请参阅'''
* Parent: <code>[[Documentation/DevGuide/Extensions/Description of XML Elements#Element /description/icon|<icon>]]</code>
+
*[[Zh/Documentation/DevGuide/Extensions/Icon|图标]]
* Children: none
+
*[[Zh/Documentation/DevGuide/Extensions/Example|description.xml 示例]]
* Since: OOo 3.0
+
  
 +
 +
==== <code>/description/icon/default</code> 元素 ====
 +
 +
* 父元素: <code>[[Zh/Documentation/DevGuide/Extensions/Description of XML Elements#Element /description/icon|<icon>]]</code>
 +
* 子元素: 无
 +
* 始用于: OOo 3.0
  
 
{|border="1" cellpadding=4 style="border-collapse:collapse;"
 
{|border="1" cellpadding=4 style="border-collapse:collapse;"
 
|-bgcolor=#EDEDED
 
|-bgcolor=#EDEDED
|+ Attributes of <code><default></code> ||  
+
|+ <code><default></code> 的属性||  
!Attribute
+
!属性
!Description
+
!说明
 
|-
 
|-
 
|<code>xlink:href</code>  
 
|<code>xlink:href</code>  
|The value is a relative URL to the icon file within the extension.
+
|值为扩展中图标文件对应的 URL。
 
|}
 
|}
  
  
'''See also'''
+
'''也请参阅'''
*[[Documentation/DevGuide/Extensions/Example|Example of description.xml]]
+
*[[Zh/Documentation/DevGuide/Extensions/Example|description.xml 示例]]
  
  
==== Element <code>/description/icon/high-contrast</code> ====
+
==== <code>/description/icon/high-contrast</code> 元素====
* Parent: <code>[[Documentation/DevGuide/Extensions/Description of XML Elements#Element /description/icon|<icon>]]</code>
+
* Children: none
+
* Since: OOo 3.0
+
  
 +
* 父元素: <code>[[Zh/Documentation/DevGuide/Extensions/Description of XML Elements#Element /description/icon|<icon>]]</code>
 +
* 子元素: 无
 +
* 始用于: OOo 3.0
  
 
{|border="1" cellpadding=4 style="border-collapse:collapse;"
 
{|border="1" cellpadding=4 style="border-collapse:collapse;"
 
|-bgcolor=#EDEDED
 
|-bgcolor=#EDEDED
|+ Attributes of <code><high-contrast></code> ||  
+
|+ <code><high-contrast></code> 的属性||  
!Attribute
+
!属性
!Description
+
!说明
 
|-
 
|-
 
|<code>xlink:href</code>  
 
|<code>xlink:href</code>  
|The value is a relative URL to the icon file within the extension.
+
|值为扩展中图标文件对应的 URL。
 
|}
 
|}
  
  
'''See also'''
+
'''也请参阅'''
*[[Documentation/DevGuide/Extensions/Example|Example of description.xml]]
+
*[[Zh/Documentation/DevGuide/Extensions/Example|description.xml 示例]]
  
  
 
==== Element <code>/description/extension-description</code> ====  
 
==== Element <code>/description/extension-description</code> ====  
Parent: <code>[[Documentation/DevGuide/Extensions/Description of XML Elements#Element /description|<description>]]</code>
 
* Children:
 
** <code>[[Documentation/DevGuide/Extensions/Description of XML Elements#Element /description/extension-description/src|<src>]]</code>
 
* Since: OOo 3.1
 
<extension-description> must have at least on [[Documentation/DevGuide/Extensions/Description of XML Elements#Element /description/extension-description/src|<src>]] child element. Every child references a localized description. See [[Documentation/DevGuide/Extensions/Localized XML Elements]] for details.
 
  
 +
* 父元素: <code>[[Documentation/DevGuide/Extensions/Description of XML Elements#Element /description|<description>]]</code>
 +
* 子元素:
 +
** <code>[[Zh/Documentation/DevGuide/Extensions/Description of XML Elements#Element /description/extension-description/src|<src>]]</code>
 +
* 始用于: OOo 3.1
  
'''See also'''
+
<extension-description> 必需至少有一个 [[Zh/Documentation/DevGuide/Extensions/Description of XML Elements#Element /description/extension-description/src|<src>]] 子元素。没个子元素引用一个本地化的说明。详见 [[Zh/Documentation/DevGuide/Extensions/Localized XML Elements]]
*[[Documentation/DevGuide/Extensions/Extension Description|Extension Description]]
+
*[[Documentation/DevGuide/Extensions/Example|Example of description.xml]]
+
  
  
==== Element <code>/description/extension-description/src</code> ==== 
+
'''也请参阅'''
* Parent: <code>[[Documentation/DevGuide/Extensions/Description of XML Elements#Element /description/extension-description|<extension-description>]]</code>
+
*[[Zh/Documentation/DevGuide/Extensions/Extension Description|扩展说明]]
* Child elements: none
+
*[[Zh/Documentation/DevGuide/Extensions/Example|description.xml 示例]]
* Since: OOo 3.1
+
  
The element contains information about where to find the file containing the description text and which language it uses.
 
  
 +
==== <code>/description/extension-description/src</code> 元素 ==== 
 +
 +
* 父元素: <code>[[Zh/Documentation/DevGuide/Extensions/Description of XML Elements#Element /description/extension-description|<extension-description>]]</code>
 +
* 子元素: 无
 +
* 始用于: OOo 3.1
 +
 +
这个元素包含如何寻找含有说明文本的文件以及它使用何种语言的相关信息。
  
 
{|border="1" cellpadding=4 style="border-collapse:collapse;"
 
{|border="1" cellpadding=4 style="border-collapse:collapse;"
 
|-bgcolor=#EDEDED
 
|-bgcolor=#EDEDED
|+ Attributes of <code><license-text></code>
+
|+ <code><license-text></code> 的属性
!Attribute
+
!属性
!Description
+
!说明
 
|-
 
|-
 
|<code>xlink:href</code>  
 
|<code>xlink:href</code>  
|Required. The value is a relative URL to the description file within the extension.
+
|必需。值为扩展内说明文件对应的 URL。
 
|-
 
|-
 
|<code>lang</code>  
 
|<code>lang</code>  
|Required. A language identifier according to RFC 3066. See also [[Documentation/DevGuide/Extensions/Localized XML Elements]].
+
|必需。RFC 3066 标准的语言标识。详见 [[Zh/Documentation/DevGuide/Extensions/Localized XML Elements]]
 
|}
 
|}
  
  
'''See also'''
+
'''也请参阅'''
*[[Documentation/DevGuide/Extensions/Extension Description|Extension Description]]
+
*[[Zh/Documentation/DevGuide/Extensions/Extension Description|扩展说明]]
*[[Documentation/DevGuide/Extensions/Example|Example of description.xml]]
+
*[[Zh/Documentation/DevGuide/Extensions/Example|description.xml 示例]]
 
+
 
+
  
  
 
{{PDL1}}
 
{{PDL1}}
  
[[Category:Documentation/Developer's Guide/Extensions]]
+
[[Category:文档/开发者指南/扩展]]

Revision as of 08:53, 9 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,或只是安装者接收此 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 Required. A language identifier according to RFC 3066. See also 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> must have at least one <name> child element. The children of this element provide a localized publisher name together with a URL.


也请参阅


/description/publisher/name 元素

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


The text value of this element is the publisher name.

<name> 的属性
属性 说明
xlink:href Required. The value is a URL to the web site of the publisher of the extension.
lang Required. A language identifier according to RFC 3066. See also 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 Required. The value is a URL to the release notes of the extension.
lang Required. A language identifier according to RFC 3066. See also 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