Configuration

As usual, the Calyxo Forms 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/forms.

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 Forms document type:

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

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

Document structure

The root element is <calyxo-forms-config>. As common to all of Calyxo's configuration files, the root element specifies the xmlns and version attributes and 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 them 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 contains an optional <validators> element and zero or more <forms> elements. The <validators> element contains one or more validator definitions. A <forms> element can be associated with a locale by specifying the language, country and variant attributes. This advanced feature is covered in the i18n section.

For now, let's consider the usual case, where we have exactly one <forms> section, without specifying a locale. Thus, our configuration document looks like this:

<calyxo-forms-config version="0.9"
  xmlns="http://calyxo.odysseus.de/xml/ns/forms"
  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 -->

  <!-- a validators element can go here -->

  <forms>

    <!-- form definitions go here -->

  </forms>

</calyxo-forms-config>

A <forms> element contains one or more form definitions.