CCML0.2


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

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

A CCML0.2 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 divide the 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.2 document should begin with:

<!DOCTYPE CCML PUBLIC "-//Lancaster University//DTD CCML 0.2//EN-UK"
  "http://www.comp.lancs.ac.uk/computing/research/mpg/projects/pan/ccml-2.dtd">

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

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

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

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

Each <REL> element has a PROP attribute identifying a property in the environment description, and an ARG attribute giving a set of compatible values, and optional attributes OP and TYPE supporting more sophisticated property expressions.

Each <LOGIC> contains other expression elements to form a logical expression.

Finally, an <EXT DATA="#id"> is a reference expression that identifies an element at another location in the document, and evaluates the same as that element.

The syntax is defined concisely by the DTD.

Example

<!DOCTYPE CCML PUBLIC "-//Lancaster University//DTD CCML 0.2//EN-UK"
  "http://www.comp.lancs.ac.uk/computing/research/mpg/projects/pan/ccml-2.dtd">

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

<CCML>
  <LOGIC ID="linux" OP="AND">
    <REL PROP="capsule" ARG="linux-module" />
    <REL PROP="capsule-version"
           OP="GE"
         TYPE="VERSION"
          ARG="1.1" />
  </LOGIC>

  <ABS>
    <!-- ADP component -->

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

    <CON URI="wibble.jar">
      <EXT DATA="#linux" />
      <REL PROP="arch" ARG="i386,i486,i586,i686" />
    </CON>

    <CON URI="wubble.jar">
      <EXT DATA="#linux" />
      <REL PROP="arch" ARG="sun4" />
    </CON>

    <CON URI="webble.jar">
      <REL PROP="caspule" ARG="telefonica" />
    </CON>
  </ABS>

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

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

    <CON URI="squibble.jar">
      <REL PROP="profile" ARG="UK.ac.lancs.linuxdevice.Kernel" />
    </CON>

    <CON URI="rabble.jar">
      <REL PROP="profile" ARG="ES.telefonica.AOS" />
    </CON>
  </ABS>

  <ABS>
    <!-- ACP component -->

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

Comparison with CCML0.1

  • It introduces (perhaps errantly) a public identifier for the document type, namely -//Lancaster University//DTD CCML 0.2//EN-UK.

  • It renames most of the original elements:

    • <SELECT> becomes <ABS>, to indicate that it represents an abstract component.

    • <CHOICE> becomes <CON>, to indicate that it represents a concrete component.

    • <PROPERTY NAME="name" VALUE="value" /> becomes <REL PROP="name" ARG="value"/>.

  • It introduces OP and TYPE attributes to property expressions, for richer comparisons.

  • It introduces <LOGIC>, for logical expressions.

  • It introduces <EXT>, for referenced expressions.