Conditional processing to generate multiple deliverable types
By default, the content of most elements is included in all output media. Within maps and topics, elements can specify the delivery targets to which they apply.
Within maps, topic references can use the deliveryTarget attribute to indicate the delivery targets to which they apply. The map or topic references can still use the deprecated print attribute to indicate whether they are applicable to print deliverables.
Within topics, most elements can use the deliveryTarget attribute to indicate the delivery targets to which they apply.
If a referenced topic should be excluded from all output formats, set the processing-role attribute to "resource-only" instead of using the deliveryTarget or print attribute. Content within that topic can still be referenced for display in other locations.
deliveryTarget attribute
deliveryTarget
The intended delivery target of the content, for example "html", "pdf", or "epub". This attribute is a replacement for the now deprecated print attribute.
The deliveryTarget attribute is specialized from the props attribute. It is defined in the deliveryTargetAttDomain, which is integrated into all OASIS-provided document-type shells. If this domain is not integrated into a given document-type shell, the deliveryTarget attribute will not be available.
The deliveryTarget attribute is processed the same way as any other conditional processing attribute. For example, the element <topicref deliveryTarget="html5 epub" href="example.dita"/> uses two values for deliveryTarget. A conditional processing profile can then set rules for deliveryTarget that determine whether the topic example.dita is included or excluded when the map is rendered as HTML5 or EPUB.
print attribute
Note: Beginning with DITA 1.3, the print attribute is deprecated. Its functionality is superseded by that of the deliveryTarget conditional processing attribute described above.
The print attribute supports the following enumerated values, each of which control the way that print-oriented processors handle the inclusion or exclusion of topics or groups of topics.
Value | Example | Print-oriented processing | Non-print-oriented processing |
---|
Unspecified (default) | <topicref href="foo.dita"> | Topics are included in output. | Topics are included in output. |
yes | <topicref href="foo.dita" print="yes"> | Topics are included in output. | Topics are included in output. |
printonly | <topicref href="foo.dita" print="printonly"> | Topics are included in output. | Topics are excluded from the output. |
no | <topicref href="foo.dita" print="no"> | Topics are excluded from the output. | Topics are included in output. |
-dita-use-conref-target | <topicref conref="#foo-topic" print="-dita-use-conref-target"> | Topics derive a value for the print attribute from the print attribute of the referenced element. | Topics derive a value for the print attribute from the print attribute of the referenced element. |
If a value for the print is not specified explicitly in a map element, but is specified in a map that references the map element, the print value cascades to the referenced map.
Parent topic