ibexa

Path

ez publish / technical manual / 3.8 / features / packages / package.xml format


Caution: This documentation is for eZ Publish legacy, from version 3.x to 5.x.

package.xml format

This section describes important XML tags that are used by the packages system. These tags are used in a "package.xml" file that is located in a package directory.

Items to be installed

The package installation process is determined by the list of items to install. This list is always specified between the <install> and </install> XML tags. (Please note that using two <install> tags inside one "package.xml" file is not allowed.)

An item to install is specified using the <item> XML tag. The following table reveals the list of the tag's attributes.

Attribute

Value

type

The type of the item ("ezcontentclass", "ezcontentobject", "ezextension", "ezinstallscript", etc.)

filename

The name of the ".xml" file that contains information about the item (without the file extension).

sub-directory

The name of the subdirectory which contains the item's ".xml" file.

Example

Let's say that a content class package contains three content classes called "myarticle", "myfolder" and "myproduct". These classes are described in the files called "class-myarticle.xml", "class-myfolder.xml" and "class-myproduct.xml" that are located in the "myclassdir" subdirectory under the package directory. In this case, the "package.xml" file located in the package directory may contain the following lines:

<install>
<item type="ezcontentclass"
            filename="class-myarticle"
            sub-directory="myclassdir" />
<item type="ezcontentclass"
            filename="class-myfolder"
            sub-directory="myclassdir" />
<item type="ezcontentclass"
            filename="class-myproduct"
            sub-directory="myclassdir" />
</install>

This will instruct the system to install three items of the "ezcontentclass" type in the following order:

  • myarticle
  • myfolder
  • myproduct

Items to be uninstalled

The package uninstallation process is determined by the list of items to uninstall. This list is always specified between the <uninstall> and </uninstall> XML tags. (Please note that using two <uninstall> tags inside one "package.xml" file is not allowed.)

An item to uninstall is specified using the <item> XML tag (as described above).

Dependent packages that are required

A site package usually contains dependencies to other packages. Choosing a site package in the setup wizard will result in downloading, importing and installing its dependent packages. The list of dependent packages that the site package requires is always specified between the <requires> and </requires> XML tags located within the <dependencies> and </dependencies> pair.

Dependent packages are specified using the <require> XML tag. The following table reveals the list of the tag's attributes.

Attribute

Value

type

The type of the package (usually "ezpackage").

name

The internal name of the package.

min-version

The minimal version of the package that can be used.

Example

The "package.xml" file of the "News" site package may contain the following lines:

<dependencies>
    <provides />
    <requires>
      <require type="ezpackage"
               name="news"
               min-version="1.0" />
      <require type="ezpackage"
               name="media"
               min-version="1.0-3" />
      <require type="ezpackage"
               name="t01"
               min-version="1.0" />
    </requires>
    <obsoletes />
    <conflicts />
  </dependencies>


This means that the "News" site package requires the following three dependent packages:

  • news (version 1.0 or higher)
  • media (version 1.0-3 or higher)
  • t01 (version 1.0 or higher)

Choosing the "News" site package in the setup wizard will result in downloading the site package itself and all its dependent packages. All dependent packages except from the site style package will be automatically installed.

Svitlana Shatokhina (03/07/2006 9:09 am)

Svitlana Shatokhina (16/03/2007 3:56 pm)

Svitlana Shatokhina, Balazs Halasy


Comments

  • DTD of package.xml

    Hi, where do i find DTD for package.xml? (I hope there is one >_>;;)
    • Re: DTD of package.xml

      Wouldn't bet to high on that..