Step new-definition {http://www.daisy.org/ns/pipeline/braille-css}

Migrate to a custom CSS definition.

Defined in: http://www.daisy.org/pipeline/modules/braille/css-utils/library.xpl

Input Ports

Port Description
source primary

The input is assumed to be a tree-of-boxes representation of a document, where boxes are represented by css:box elements. Box properties may be declared in style attributes or individial css:* attributes or both.

definition

The new CSS definition must be a xsl:stylesheet consisting of a one variable and four functions. All properties and functions must be in the namespace "css:new-definition". The 'properties' variable is a sequence of strings that defines the supported properties. The 'is-valid' function defines whether a property declaration is valid. The 'is-inherited' function defines whether a property is inherited. The 'initial-value' function defines the initial value of a property. The 'applies-to' function defines whether a property applies in a certain context. All functions are possibly context dependent.

parameters parameter

There parameters that are passed to the definition XSLT.

Output Ports

Port Description
result primary

css:* attributes will be added on boxes in the output in such a way that for each box and for each of the new definition's properties, the value of the property computed at the input according to the old CSS definition is equal to the value computed at the output according to the new definition. Property declarations are omitted from the output when possible, 'initial' values are concretized, and 'inherit' values are concretized only when needed. style attributes on boxes at the output are dropped. css:* attributes that don't correspond to a property in the new definition are retained.