Difference between revisions of "Documentation/DevGuide/Extensions/Description of the Update Information"

From Apache OpenOffice Wiki
Jump to: navigation, search
m (14 revision(s))
Line 285: Line 285:
  
 
{{PDL1}}
 
{{PDL1}}
[[Category: Extensions]]
+
[[Category: Documentation/Developers Guide/Extensions]]

Revision as of 13:19, 4 June 2008




The update information can be contained in a file which can be directly accessed through a URL or it can be generated on demand (HTTP get request). If it is a file then it could be named according to this pattern:

 <extension_file_name>.update.xml

For example, the update information file for the extension myextension.oxt is myextension.update.xml. The .oxt file extension is not used.

It follows the description of the XML structure of the update information data:

Element /description

<description> is the root element of the update information XML document.


Attribute <description>
Attribute Description
xmlns The default namespace of element description and all children must be defined as

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

xmlns:dep The namespace for dependency information must be defined as

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

xmlns:xlink The xlink namespace must be defined as

http://www.w3.org/1999/xlink

other namespace definitions Other namespaces can be added as necessary.


Element /description/identifier


Attributes of <identifier>
Attribute Description
value Required. The extension identifier.


Element /description/version


Attributes of <version>
Attribute Description
value Required. A textual representation of the extension version.


Element /description/update-download

<update-download> must have at least one <src> child element. If <update-download> is provided then there must not be a <update-website> element.

The second, third, etc. <src> element are regarded as fallback, that is, the elements provide URLs to mirrors. The Extension Manager will try to download the extension by using the first URL and only uses the next URL if an error occurred, for example because the the connection was interrupted.

Example:

<update-download>
  <src xlink:href="http://my.company.com/product/download/extension.oxt" />
  <src xlink:href="http://my.company.com/product/download-mirror/extension.oxt" />
</update-download>

Element /description/update-download/src


Attributes of <src>
Attribute Description
xlink:href Required. The value is a URL which refers to the extension


Element /description/update-website

<update-website> must have at least one <src> child element. If <update-website> is provided then there must not be a <update-download> element.

The children of this element provide a URL to the web site where the new version of the extension can be downloaded. There can be multiple localized web sites with different URLs. Each URL can be provided by a separate <src> element. See Localized XML Elements about how the Extension Manager chooses the proper <src> element.

Example:

<update-website>
  <src xlink:href="http://my.company.com/product/download_de.html" lang="de" />
  <src xlink:href="http://my.company.com/product/download_en.html" lang="en" />
  <src xlink:href="http://my.company.com/product/download_de-DE.html" lang="de-DE" />
</update-website>

Element /description/update-website/src


Attributes of <src>
Attribute Description
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.


Element /description/dependencies

Example:

<dependencies xmlns:dep="http://openoffice.org/extensions/description/2006">
  <dep:OpenOffice.org-minimal-version value="2.1" dep:name="OpenOffice.org 2.1"/>
</dependencies>


Element /description/dependencies/OpenOffice.org-minimal-version

The namespace of this element must be http://openoffice.org/extensions/description/2006.

Attributes of <OpenOffice.org-minimal-version>
Attribute Description
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).
value Required. The required underlying OpenOffice.org version (“2.1”, “2.2”, etc.), starting with OpenOffice.org 2.1.


Element /description/publisher

The children of this element provide a localized publisher name together with a URL. <publisher> must have at least one <name> child element.

The publisher name is displayed in the update dialog of the Extension Manager. Clicking on the name causes the web browser to be opened which navigates to the web site determined by the <name> element.

Example:

<publisher>
  <name xlink:href="http://my.company.com/product/download_de.html" lang="de">Meine Firma</name>
  <name xlink:href="http://my.company.com/product/download_en.html" lang="en">My Company</name>
  <name xlink:href="http://my.company.com/produc/download_de-DE.html" lang="de-DE">Meine Firma</name>
</publisher>


Element /description/publisher/name

The text value of this element is the publisher name.


Attributes of <name>
Attribute Description
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.


Element /description/release-notes

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

The update dialog of the Extension Manager shows a link to the release notes if this element is provided. Clicking on it will cause a web browser to be opened which navigates to the release notes page using the URL provided by the respective <src> element.

Example:

<release-notes>
  <src xlink:href="http://my.company.com/product/release-notes_de.txt" lang="de" />
  <src xlink:href="http://my.company.com/product/release-notes_en.txt" lang="en" />
</release-notes>


Element /description/release-notes/src

The element contains a URL to the release notes.


Attributes of <src>
Attribute Description
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 Documentation/DevGuide/Extensions/Localized XML Elements.


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