Know how you can generate conditional output for DITA topics in Adobe FrameMaker.
This topic covers, with a sample use case, the steps to generate a PDF output containing conditional content.
<p>
) tags. You can, however, create conditional output from any DITA element in a document.Create a DITA topic with four paragraph (<p>
) elements:
Content ONLY for administrators.
Set the @audience
attribute to admin
.
Content ONLY for authors.
Set the @audience
attribute to author
.
Content for administrators and authors
Set the @audience
attribute to admin author
.
Content for end users and authors.
Set the @audience
attribute to end_user author
.
Save the document.
Create a DITAVAL file with four prop elements:
@attr
: audience
@val
: admin
@action
: include
@attr
: audience
@val
: author
@action
: exclude
@attr
: audience
@val
: end_user
@action
: exclude
The above DITAVAL will output all content targeted at administrators.
Save the DITAVAL file.
Create a DITA map and include the above document and save the DITA map as a PDF (
).In the Save Document dialog, check the Prompt For DitaVal File option and click Save.
The Choose DitaVal File dialog appears.
Select the DITAVAL file and click Choose.
The Apply As Condition option will output the entire contents. However, the contents that is marked as excluded in the DITAVAL file is output with a strike-through. You choose this option for document review. For example, use this option to indicate to a reviewer the contents that is marked as excluded.
In the PDF Setup dialog, click Set.
The output PDF file includes and excludes content based on the attributes that are set up in the document and the corresponding DITAVAL file.