DITA writer
This directory contains the DITA output writer.
The output writer provides the following rules for each output element.
(In the descriptions, moduleName stands for a module that
provides an element or attribute, elementName stands for
an element, and attributeName stands for an attributeName.)
Each rule consists of a mode:
- moduleName.elementName.out
- Generates the elementName element from the moduleName module.
For instance, the topic.keyword.out rule generates a <keyword> element.
The rule also fires the wrapper rules to request the attributes and content
of the element.
- moduleName.elementName.atts.in
- Provides a wrapper for requesting the attributes of the elementName element
from moduleName module.
- moduleName.elementName.attributeName.att.in
- Requests the value of attributeName in the context
of the elementName element from the moduleName module.
The default handler for this rule requests the value of attributeName in
any context.
- attributeName.att.in
- Requests the value of attributeName in any context.
- moduleName.elementName.content.in
- Provides a wrapper for requesting the content of the elementName element
from moduleName module. If the content model isn't shared,
the default handler for this rule requests content from the children and text
(if the content model supports mixed content) of the current input node.
If
the content model is shared, the default handler invokes a rule for the shared
content model. For instance, elements that accept content conforming to the words.cnt group
invoke the rule for words.cnt.text.in.
If the content
model takes a simple sequence, the default handler for this rule requests
the subelements in sequence.
- moduleName.elementName.child
- Requests the current input element as a child in the context of the elementName element
from the moduleName module. The default handler for this
rule requests the current input element as a child in any context.
- child
- Requests the current input element as a child in any context.
- moduleName.elementName.in
- Requests the elementName element from the moduleName module.
This rule gets invoked only by a content wrapper when the content model has
a simple sequence.
The reader can handle a request in a specific output context or in any
context as appropriate. For instance, the Docbook reader handles a context-free
request for an id attribute by copying the id (if present) on the current
input element to the output. In addition, however, the Docbook reader handles
the request for an id attribute in a topic context by generating an id if
necessary.