xml.new-definition.xpl Maven / Gradle / Ivy
Migrate to a custom CSS definition.
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.
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.
There parameters that are passed to the definition
XSLT.
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.