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. In the Save Document dialog, check the Prompt For DitaVal File option and click Save.

    The Choose DitaVal File dialog appears.

  3. 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.

  4. 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.