Generate conditional output (PDF)

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.

Note: The sample used in this topic includes content only in paragraph (<p>) tags. You can, however, create conditional output from any DITA element in a document.

Create a sample DITA topic

Create a DITA topic with four paragraph (<p>) elements:

  1. Content ONLY for administrators.

    Set the @audience attribute to admin.

  2. Content ONLY for authors.

    Set the @audience attribute to author.

  3. Content for administrators and authors

    Set the @audience attribute to admin author.

  4. Content for end users and authors.

    Set the @audience attribute to end_user author.

Save the document.

Create a sample DITAVAL file

Create a DITAVAL file with four prop elements:

  1. @attr: audience

    @val: admin

    @action: include

  2. @attr: audience

    @val: author

    @action: exclude

  3. @attr: audience

    @val: end_user

    @action: exclude

The above DITAVAL will output all content targeted at administrators.

Save the DITAVAL file.

Save the condionalized content as a PDF

  1. Create a DITA map and include the above document and save the DITA map as a PDF (File > Save As PDF).

  2. By default, the DITAVAL of the last publish process is picked for the Save As PDF workflow. If you want, you can choose another DITAVAL from the Publish process. Then the selected DITAVal will be used for the Save As PDF workflow.

The output PDF file includes and excludes content based on the attributes that are set up in the document and the corresponding DITAVAL file.