Print versus non-print metadata

You can use condition attributes in topic elements, the print attribute in the topicref element, separate ditamaps, or a combination of these approaches when you need to produce different print and non-print versions of the same document.

There are a number of ways of differentiating "Web-only" and "print-only" content, or other medium-dependent conditions. The best method will depend on the semantics involved, and the particular scenario.

In many cases, marking up content using otherprops attribute values of, for example, manual_only and web_only may be appropriate. If the reason for the differentiation relates to the different audiences for print and Web deliverables, then the audience attribute would be a better choice. In the same way, if the reason for differentiation was that you are producing two separate document products, such as a book to be sold on the Web and a book to be sold in bookshops, the product attribute is more suitable.

The topicref element in the ditamap has a print attribute with valid values of yes and no. If you are simply wanting to exclude complete topics from the print version of a document, this attribute should be used.

If you have some common and some different topics for print and Web versions, you may find that creating two ditamaps, one for print and one for Web, is a better approach than applying conditions to the topicref elements in a single ditamap.