Represents the root of a tree of documents. In addition to the recursive structure of documents, usually obtained by parsing text markup, it holds additional items like styles and static documents, which may contribute to the rendering of a site or an e-book.
The styles property of this type is currently only populated and processed when rendering PDF or XSL-FO. Styles for HTML or EPUB documents are part of the staticDocuments property instead and will be integrated into the final output, but not interpreted.
Value parameters
coverDocument
the cover document (usually used with e-book formats like EPUB and PDF)
includes
the map of configuration includes that may be needed when resolving template configuration
staticDocuments
the descriptors for documents that were neither identified as text markup, config or templates, and will be copied as is to the final output
styles
the styles to apply when rendering this tree, only populated for PDF or XSL-FO output
tree
the recursive structure of documents, usually obtained from parsing text markup
Returns a new tree, with all the document models contained in it rewritten based on the specified rewrite rules.
Returns a new tree, with all the document models contained in it rewritten based on the specified rewrite rules.
If the rule is not defined for a specific element or the rule returns a Retain action as a result the old element remains in the tree unchanged.
If it returns Remove then the node gets removed from the ast, if it returns Replace with a new element it will replace the old one.
The rewriting is performed bottom-up (depth-first), therefore any element container passed to the rule only contains children which have already been processed.
The specified factory function will be invoked for each document contained in this tree and must return the rewrite rules for that particular document.
The configuration associated with the root of the tree.
The configuration associated with the root of the tree.
Like text markup documents and templates, configurations form a tree structure and sub-trees may override and/or add properties that have only an effect in that sub-tree.
Indicates whether this tree does not contain any markup document. Template documents do not count, as they would be ignored in rendering when there is no markup document.
Indicates whether this tree does not contain any markup document. Template documents do not count, as they would be ignored in rendering when there is no markup document.