Creating a binding definition

A binding definition contains the external definition (i.e. interface) of a binding. This part of a binding is written by the binding author and the page author who uses the binding needs to know it. The grammar of a binding definition specifies the types of the bound elements along with some other characteristics that affect how MCS processes those elements.

A binding definition contains the external definition (i.e. interface) of a binding. This part of a binding is written by the binding author and the page author who uses the binding needs to know it. The grammar of a binding definition specifies the types of the bound elements along with some other characteristics that affect how MCS processes those elements.

The bd:defininition element is the root element of a binding definition. It has to contain the rng:grammar element that must contain the rng:start element and can contain rng:define. The rng:define element can contain one or more rng:element elements. The types of bound elements are specified using the name attribute of rng:element elements. The rng:start element specifies the root bound element of the binding. Its presence will trigger the binding to be applied.

Each element can also indicate whether it is presentional or not using the bd:presentional attribute. An element must be marked as presentional if the transformation defined within the binding implementation converts it into a presentational element, otherwise it has to be marked as non-presentional. If the attribute is not specified, then it defaults to 'true', i.e. the element is treated as presentional.

In addition, a bound element must be marked as a component if and only if it is converted to a component result element by the transformation. An element can be marked as being a component by setting the bd:component attribute to 'true'. If the attribute is not specified, then it defaults to 'false, i.e. the element is not a component.

The following attributes are common to all bound elements and have the same meaning as on the XDIME 2 elements:

Note:

If the rng:grammar element contains multiple definitions of the same element type, the first definition is used and the others are ignored.

Default styles

The binding definition author can define the default styles that should be applied to all usages of the bound elements. They are specified as CSS in the body of the style element inside the bd:common element. There are a number of restrictions on the selectors that can be used in the default styles.

Related topics