Examples

From Apache OpenOffice Wiki
Jump to: navigation, search



description.xml Containing Direct Reference to the Update Information

The following content of a description.xml directly references update information:

<?xml version="1.0" encoding="UTF-8"?>
<description xmlns="http://openoffice.org/extensions/description/2006"
  xmlns:xlink="http://www.w3.org/1999/xlink">
  <version value="1.0" /> 
 
  <update-information>
    <src xlink:href="http://my.company.com/update/extension.update.xml" />
    <src xlink:href="http://my.company-mirror.com/update/extension.update.xml" />
  </update-information>
</description>

The second src element contains a URL to a mirror which will be used by the Extension Manager if the location referenced by the URL in the first src element cannot be reached.

This is the content of extension.update.xml:

<?xml version="1.0" encoding="UTF-8"?>
<description xmlns="http://openoffice.org/extensions/update/2006"
  xmlns:xlink="http://www.w3.org/1999/xlink">
  <identifier value="org.openoffice.legacy.extension.oxt"/>
  <version value="2.0" /> 
  <update-download>
    <src xlink:href="http://my.company.com/update/extension.oxt" />
  </update-download>
</description>

The src element contains a URL to version 2.0 of extension.oxt. extension.oxt has the identifier org.openoffice.legacy.extension.oxt because it does not define an identifier in its description.xml. Otherwise the identifier would be the same as the one in the description.xml.


description.xml OpenOffice.org 3.x update information example

The following content of a description.xml directly references update information for a German Windows OpenOffice.org 3.3.0:

<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-US">
<title>Product Update Feed</title>
<link rel="alternate" type="text/html" href="http://update.services.openoffice.org/ooo/snapshot.html"/>
<updated>2011-01-01T08:00:02Z</updated>
<author>
        <name>The OpenOffice Project</name>
        <uri>http://openoffice.org</uri>
        <email>updatefeed@openoffice.org</email>
</author>
<id>urn:uuid:76676544</id>
<entry>
        <title>Update available</title>
        <link rel="alternate" type="text/html" href="http://update.services.openoffice.org/ooo/snapshot.html"/>
        <id>urn:uuid:76676544</id>
        <!-- IMPORTANT: category MUST be equal with UpdateID in version.ini -->
        <category term="OpenOffice.org_3_de" label="OpenOffice.org update"/>
        <updated>2011-01-01T08:00:02Z</updated>
        <summary>Text below download information (should be localized)</summary>
        <content type="application/xml">
                <inst:description xmlns:inst="http://installation.openoffice.org/description">
                        <inst:id>OpenOffice.org_3_de</inst:id>
                        <inst:version>'new version information'</inst:version>
                        <!-- buildid must be higher as installed version -->
                        <inst:buildid>9580</inst:buildid>
                        <inst:os>Windows</inst:os>
                        <inst:arch>x86</inst:arch>
                        <!-- app/octet-stream generates direct download as background-process -->
                        <!--<inst:update type="application/octet-stream" src="http://download.services.openoffice.org/files/localized/de/3.3.0/OOo_3.3.0_Win_x86_install-wJRE_de.exe"/>-->
                        <!-- text/html opens src-link in default browser -->
                        <inst:update type="text/html" src="http://download.openoffice.org"/>
                </inst:description>
        </content>
</entry>
</feed>

Using the Atom Feed

This is the content of the description.xml of feed1.oxt which references an atom feed:

<?xml version="1.0" encoding="UTF-8"?>
<description xmlns="http://openoffice.org/extensions/description/2006"
  xmlns:xlink="http://www.w3.org/1999/xlink">
  <version value="1.0" /> 
  <update-information>
    <src xlink:href="http://my.company.com/update/feed1.xml" />
  </update-information>
</description>

The feed:

<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-US">
 
  <title>Extensions Update Feed</title>
  <link rel="alternate" type="text/html" href="http://update.services.openoffice.org/ooo/snapshot.html"/>
  <updated>2006-11-06T18:30:02Z</updated>
  <author>
    <name>The OpenOffice.org Project</name>
    <uri>http://openoffice.org</uri>
    <email>updatefeed@openoffice.org</email>
  </author>
  <id>urn:uuid:a4ccd383-1dd1-11b2-a95c-0003ba566e9d</id>
  <entry>
    <title>feed1.oxt version 2.0 available</title>
    <link rel="alternate" type="text/html"
      href="http://extensions.openoffice.org"/>
    <id>urn:uuid:a4ccd383-1dd1-11b2-a95c-0003ba566e9f</id>
    <category term="org.openoffice.legacy.feed1.oxt" label="feed1.oxt" />
    <updated>2006-11-06T18:30:02Z</updated>
    <summary>Click here to go to the download page.</summary>
    <content type="application/xml" src="http://extensions.openoffice.org/testarea/desktop/updatefeed/update/feed1.update.xml" />
  </entry>
  <entry>
    <title>feed2.oxt version 2.0 available</title>
    <link rel="alternate" type="text/html"
      href="http://extensions.openoffice.org"/>
    <id>urn:uuid:a4ccd383-1dd1-11b2-a95c-0003ba566eaf</id>
    <category term="org.openoffice.legacy.feed2.oxt" label="feed2.oxt" />
    <updated>2006-11-06T18:30:02Z</updated>
    <summary>Click here to go to the download page.</summary>
    <content type="application/xml" src="http://extensions.openoffice.org/testarea/desktop/updatefeed/update/feed2.update.xml" />
  </entry>
</feed>

The feed contains two entry elements and each references the update information for a different extensions. It could, however, also reference the update information for two different versions of the same extension.

The update information for the version of feed1.oxt:

<?xml version="1.0" encoding="UTF-8"?>
<description xmlns="http://openoffice.org/extensions/update/2006"
  xmlns:xlink="http://www.w3.org/1999/xlink">
  <identifier value="org.openoffice.legacy.feed1.oxt"/>
  <version value="2.0" /> 
  <update-download>
    <src xlink:href="http://extensions.openoffice.org/testarea/desktop/updatefeed/update/feed1.oxt" />
  </update-download>
</description>
Content on this page is licensed under the Public Documentation License (PDL).
Personal tools
In other languages