Configuration

As usual, the Calyxo Control component is configured per module in one or more XML configuration files.

Namespace

Each Calyxo component uses its own separate namespace for configuration elements. The elements described in the following sections are defined within namespace http://calyxo.odysseus.de/xml/ns/control.

Schema/DTD Validation

When loading configuration files, Calyxo forces the XML parser to validate documents against an XML Schema definition (XSD) or a Document Type Declaration (DTD). Calyxo prefers XML Schema validation, so, if your parser supports it, it is used. Otherwise, DTD validation is used. In this case, configuration files must declare the Calyxo Control document type:

<!DOCTYPE calyxo-control-config
  PUBLIC "-//Odysseus Software GmbH//DTD Calyxo Control 0.9//EN"
  "calyxo-control-config.dtd">

Copies of the DTD and XSD are located at CALYXO_HOME/calyxo-control/conf/share/calyxo-control-config.*.

Document structure

The root element is <calyxo-control-config>. As common to all of Calyxo's configuration files, the root element uses the xmlns attribute to specify the namespace and the version attribute to specify the schema/DTD version.

The root may optionally contain <base:import> elements, followed by <base:functions>, <base:set> and <base:use> elements. See the Calyxo Base configuration section for a description of these elements. Using these elements requires the declaration of namespace http://calyxo.odysseus.de/xml/ns/base for prefix base (as in the document template below).

Following these common elements, the root optionally contains

  1. a <plugins> element containing <plugin> elements,
  2. a <dispatches> element, containing global <dispatch> elements,
  3. an <exception-handlers> element, containing global <exception-handler> elements,
  4. an <actions> element, containing <action> elements.

Thus, our configuration document has a general structure like this:

<calyxo-control-config version="0.9"
  xmlns="http://calyxo.odysseus.de/xml/ns/control"
  xmlns:base="http://calyxo.odysseus.de/xml/ns/base">

  <!-- base:import elements can go here -->
  <!-- base:functions, base:set and base:use
       elements can go here -->

  <plugins>
    <!-- plugin definitions go here -->
  </plugins>

  <dispatches>
    <!-- dispatch definitions go here -->
  </dispatches>

  <exception-handlers>
    <!-- exception handler definitions go here -->
  </exception-handlers>

  <actions>
    <!-- action definitions go here -->
  </actions>

</calyxo-control-config>

Each of the nested elements is optional and thus may be ommitted.

Configuration Interfaces

All configuration elements have corresponding Java interfaces. When actions, filters or exception handlers are initialized by the controller, an instance reflecting their corresponding configuration element is passed to them.

The configuration interfaces are located in package de.odysseus.calyxo.control.conf.