CCML0.3


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

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

A CCML0.3 document allows a piece of software that comes in several alternative parts to be expressed in terms of those parts, how those parts should be installed, 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, and optional storage parameters to go with each URI. Toegther these can be used to deploy the software in the described environment.

A CCML0.3 document should begin with:

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

The top-level CCML element is CCML, which has no attributes, but lists a number of action elements:

  • Each <LOAD URI="uri" /> element specifies a component that should be loaded from uri. It can be referred to with a label specified in an optional REF attribute.

  • Each <STORE REF="ref" AT="location" /> element specifies that a component identified by its REF attribute should be loaded at some location.

  • Each <BRANCH> element lists several expression elements followed by several action elements. The action elements are ineffective (i.e., they don't appear in the results) if any of the expression elements fail.

  • Each <DECIDE> element contains only <BRANCH> elements. Each shall be processed until one of them succeeds. If all fail, this <DECIDE> also fails.

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.3//EN-UK"
  "http://www.comp.lancs.ac.uk/computing/research/mpg/projects/pan/ccml-3.dtd">

<!-- A proxylet requiring three components (one per BRANCH + 1 LOAD):
       * 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>

  <DECIDE>
    <!-- ADP component -->

    <BRANCH>
      <REL PROP="caspule" ARG="telefonica" />
      <LOAD URI="webble.jar" />
    </BRANCH>

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

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

    <!-- this component is allowed to be empty -->
    <BRANCH>
      <LOAD />
    </BRANCH>
  </DECIDE>

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

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

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

    <!-- this component is allowed to be empty -->
    <BRANCH>
      <LOAD />
    </BRANCH>
  </DECIDE>

  <!-- ACP component -->

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

Comparison with CCML0.2

  • It renames some elements again, to express what the CCML processor is doing, rather than what it's processing:

    • <ABS> becomes <DECIDE>.

    • <CON> becomes <BRANCH>.

  • Since <BRANCH> no longer represents a concrete component, such components are expressed with action elements that can appear conditionally inside a <BRANCH> after the listed conditions, or anywhere else unconditionally. The new action elements are <LOAD> and <STORE>, but also include <DECIDE> and <BRANCH>.

  • <DECIDE> is no longer required as a rigid structure. A <BRANCH> may appear almost anywhere to represent an optional component with no alternatives, and action elements may also appear almost anywhere if they are unconditional.