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:
class
style
id
If the rng:grammar element contains multiple definitions of the same element type, the first definition is used and the others are ignored.
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.
Every simple selector sequence must contain a fully qualified element selector, i.e. prefix and local name, that matches one of the bound elements. In other words, the use of universal selector is not supported.
Every selector must start with a simple selector sequence that matches the root bound element.
Contextual selectors (or combinators) are supported but the following restrictions apply:
the first combinator, i.e. between the first and second simple selector sequences, must be the child combinator (">");
sibling combinators may be used but descendant selectors may not.
Structural pseudo-classes (apart from :root) can be used but not with the first simple selector sequence.
There are no restrictions on the use of stateful pseudo-classes or pseudo-classes, whether custom or built-in.
Page authors cannot override values marked as '!important'.