XOE Developers Guide v1.0: A guide to application development within the XOE framework | ||
---|---|---|
Prev | Appendix A. Reference Material | Next |
Provisos describe the features provided by a package. They consist of a < proviso /> element with two attributes that specify the type of proviso, and possible child elements (depending on the type of proviso).
Dependencies specify a package that must be installed in order for the package they are found in to be installed. Dependencies need not specify a package by name - they can match any information included in the package description. Usually this information is included inside a proviso.
To create a dependency on another package, you can write a 'friendly' dependency. This dependency contains all the relevant information in a relatively simple XML structure. When you build your package, the 'friendly' dependency will be expanded to include an XPath. This XPath expression is what is actually used to search for matching packages.
In order to expand the dependency, the package build system must have access to the Package Installer Service that knows about that type of dependency. If the installer is not part of the core, you must make sure that your package depends on the package that includes the installer.
In this section, all of the core dependency types that may be explicitly specified in a package are discussed. There are other dependencies that may be added implicitly by the build system, however they are not discussed here.
An explicit dependency on a named package. An optional version (or version range) may be specified.
<!-- Depends on version 1.2 of a package named `some-pkg' --> <dep name='some-pkg' ns='http://www.xoe.org/installer/base/package'> <version> 1.2 </version> </dep> <!-- Depends on version 1.0 or greater of a package named `foosball' --> <dep name='foosball' ns='http://www.xoe.org/installer/base/package'> <minimum-version> 1.0 </minimum-version> </dep> <!-- Depends on a package named `table-tennis'.1.3 < Version <= 1.7 --> <dep name='table-tennis' ns='http://www.xoe.org/installer/base/package'> <!-- the default for `inclusive' is true --> <minimum-version inclusive='false'> 1.3 </minimum-version> <maximum-version inclusive='true'> 1.7 </maximum-version> </dep>
Depend on a package that includes a service. Specify the service using a combination of functionality, interface, and features.
<!-- Depends on having an HTTPS protocol handler --> <dep name='protocolhandler' ns='http://www.xoe.org/installer/service'> <functionality>protocolhandler</functionality> <feature name='protocol' value='https'/> </dep>