Document
Represents a single document and provides access to the document content and structure as well as hooks for triggering rewrite operations.
Value parameters
- config
-
the configuration for this document
- content
-
the tree model obtained from parsing the markup document
- fragments
-
separate named fragments that had been extracted from the content
- path
-
the full, absolute path of this document in the (virtual) document tree
- position
-
the position of this document inside a document tree hierarchy, expressed as a list of Ints
Attributes
- Graph
-
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait TreeContenttrait DocumentStructuretrait DocumentNavigationtrait Navigatableclass Objecttrait Matchableclass AnyShow all
Members list
Value members
Concrete methods
Appends the specified content to this tree and return a new instance.
Appends the specified content to this tree and return a new instance.
Attributes
Appends the specified content to this tree and return a new instance.
Appends the specified content to this tree and return a new instance.
Attributes
Prepends the specified content to this tree and return a new instance.
Prepends the specified content to this tree and return a new instance.
Attributes
Prepends the specified content to this tree and return a new instance.
Prepends the specified content to this tree and return a new instance.
Attributes
Returns a new, rewritten document model based on the specified rewrite rules.
Returns a new, rewritten document model 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.
Attributes
Inherited methods
Creates the navigation structure for this document up to the specified depth. The returned instance can be used as part of a bigger navigation structure comprising of trees, documents and their sections.
Creates the navigation structure for this document up to the specified depth. The returned instance can be used as part of a bigger navigation structure comprising of trees, documents and their sections.
Value parameters
- context
-
captures the navigation depth, reference path and styles for the navigation tree being built
Attributes
- Returns
-
a navigation item that can be used as part of a bigger navigation structure comprising of trees, documents and their sections
- Inherited from:
- DocumentNavigation
Attributes
- Inherited from:
- DocumentStructure
Attributes
- Inherited from:
- Product
Attributes
- Inherited from:
- Product
Attributes
- Inherited from:
- DocumentStructure
The formats this tree content should be rendered to.
The title of this document, obtained from the document structure or from the configuration. In case no title is defined in either of the two places the result will be None
.
The title of this document, obtained from the document structure or from the configuration. In case no title is defined in either of the two places the result will be None
.
Attributes
- Inherited from:
- DocumentStructure
Attributes
- Inherited from:
- TreeContent
Inherited fields
The local name of this navigatable.
The section structure of this document based on the hierarchy of headers found in the original text markup.
The section structure of this document based on the hierarchy of headers found in the original text markup.
Attributes
- Inherited from:
- DocumentStructure