
xml.make-anonymous-inline-boxes.xpl Maven / Gradle / Ivy
Break inline boxes around contained block boxes and create anonymous inline boxes
(http://braillespecs.github.io/braille-css/#anonymous-boxes).
The input is assumed to be a tree-of-boxes representation of a document where boxes are
represented by css:box elements. The parent of a box must be another box or a
css:_ element.
Inline boxes that have descendant block, table or table-cell boxes are either unwrapped,
or if the element has one or more css:* attributes or if it's the document element,
renamed to css:_. For such elements, the inherited properties (specified in the
element's style attribute) are moved to the next preserved descendant box, and 'inherit'
values on the next preserved descendant box are concretized. xml:lang attributes are
moved to the next preserved descendant box as well. css:_ elements are retained. All
adjacent nodes that are not boxes or css:_ elements containing a box and that are not
already contained in an inline box are wrapped into an anonymous one, unless they are
all white space nodes or empty css:_ elements. Additional anonymous inline boxes are
created in order to ensure that all block boxes have at least one descendant box.
© 2015 - 2025 Weber Informatics LLC | Privacy Policy