The letters allowed inside elements are A-Z and a-z. Other characters, such as é must use entities (in this case: é).
If you create your package.xml files using the PEAR_PackageFileManager, upgrade your PEAR installation to version 1.4.0a2 or greater and you won't have to worry about this because the file manager
takes care of this automatically.
<?xml version="1.0" encoding="ISO-8859-1" ?>
<package version="1.0">
<name>Money_Fast</name>
<summary>Make money fast.</summary>
<description>
This package helps you to make money pretty fast.
</description>
<license>PHP License</license>
<maintainers>
<maintainer>
<user>foo</user>
<name>Joe Foo</name>
<email>foo@example.com</email>
<role>lead</role>
</maintainer>
</maintainers>
<release>
<version>1.0</version>
<date>2002-05-27</date>
<state>stable</state>
<notes>
This is the first release.
</notes>
<filelist>
<dir name="/" baseinstalldir="Money">
<file role="php" name="Fast.php" />
</dir>
</filelist>
</release>
</package>
This package.xml can serve as a template for you as it already contains all necessary elements. In most cases you only need to change the character data between the tags
in order to use the example in your package.
In this example you get to know a very handy feature: When you have a directory in your package that only contains files of the same type, you can add to role attribute even to the <dir> tag instead of adding it to every single <file> tag.
With the knowledge you aquired during this chapter you should now be able to produce a package definition file for your own package. If you still have questions concerning the topic, don't
hesitate to ask on the mailinglist.
The attribute optional can be used when a dependency is not required but having the package installed can bring enhanced functionalities. The only legal values are "yes"
and "no". If the optional attribute is not present, a dependency is required. When optional="yes" is used, this attribute will result in installation messages similar to the
following messages:
$ pear install <package>
Optional dependencies:
Package `XML_Tree' is recommended to utilize some features.
Package `MDB' is recommended to utilize some features.