CCML0.1


CCML is an XML-based language for agent-driven content negotiation.

Note that CCML0.1 is superceded by CCML0.2 and later versions.

A CCML 0.1 document allows a piece of software that comes in several alternative parts to be expressed in terms of those parts and the requirements they have of any system onto which they may be installed.

A CCML document is processed against an environment description (a set of named properties). The result is a set of compatible URIs of parts used to deploy the software in the described environment.

The document lists a number of abstract components that dividethe software into various roles (such as a platform-independent part, a highly-dependent part, and an interface between the other two). Each abstract component is then divided into groups of potential concrete components which list the (relative) URIs of the components together with their requirements.

A CCML0.1 document should begin with:

<!DOCTYPE CCML SYSTEM
  "http://www.comp.lancs.ac.uk/computing/research/mpg/projects/pan/ccml.dtd">

The top-level CCML element is CCML, which has no attributes.

Each abstract component is described by a <SELECT> element. This has no attributes, but contains several <CHOICE> elements, each representing a concrete component.

Each <CHOICE> has a URI attribute listing its (space-separated) URIs (relative to the document's location). It may also contain several <PROPERTY> elements, each expressing a condition that must be met if the concrete component (<CHOICE>) is to be considered compatible with the described environment.

In processing the document, exactly one compatible <CHOICE> must be chosen from each <SELECT> block, or failure is reported. If several <CHOICE>s are compatible, the last is chosen.

Each <PROPERTY> element has a NAME attribute identifying a property in the environment description, and a VALUE attribute giving a set of compatible values. (Later versions support more sophisticated property expressions. This is equivalent to using the operator overlap with type string in those later versions.)

The syntax is defined concisely by the DTD.

Example

<!DOCTYPE CCML SYSTEM
    "http://www.comp.lancs.ac.uk/computing/research/mpg/projects/pan/ccml.dtd">

<!-- A proxylet requiring three components (one per SELECT):
       * the platform-specific ADP,
       * a veneer between the ADP and the ACP,
       * the platform-independent ACP. -->

<CCML>
  <SELECT>
    <!-- ADP component -->

    <!-- this component is allowed to be empty -->
    <CHOICE/>

    <CHOICE URI="wibble.jar">
      <PROPERTY NAME="capsule" VALUE="linux-module" />
      <PROPERTY NAME="arch" VALUE="i386,i486,i586,i686" />
    </CHOICE>

    <CHOICE URI="wubble.jar">
      <PROPERTY NAME="capsule" VALUE="linux-module" />
      <PROPERTY NAME="arch" VALUE="sun4" />
    </CHOICE>

    <CHOICE URI="webble.jar">
      <PROPERTY NAME="caspule" VALUE="telefonica" />
    </CHOICE>
  </SELECT>

  <SELECT>
    <!-- ACP/ADP veneer component -->

    <!-- this component is allowed to be empty -->
    <CHOICE/>

    <CHOICE URI="squibble.jar">
      <PROPERTY NAME="profile" VALUE="UK.ac.lancs.linuxdevice.Kernel" />
    </CHOICE>

    <CHOICE URI="rabble.jar">
      <PROPERTY NAME="profile" VALUE="ES.telefonica.AOS" />
    </CHOICE>
  </SELECT>

  <SELECT>
    <!-- ACP component -->

    <!-- this component is platform-independent -->
    <CHOICE URI="wobble.jar" />
  </SELECT>
</CCML>