DITA filtering with default content

Post here questions and problems related to editing and publishing DITA content.
aaron
Posts: 10
Joined: Fri May 22, 2020 6:44 pm

DITA filtering with default content

Post by aaron »

Say I have the sets of paragraphs:

Code: Select all

<p audience="ANSI">According to ANSI legislation ... </p>
<p>Refer to local legislation.</p>

Code: Select all

<p audience="OSHA">According to OSHA legislation ... </p>
<p audience="ISO">According to ISO legislation ... </p>
<p>Refer to local legislation.</p>



If published for use in countries which use ANSI, then the first paragraph in the first set should be included, and the default value in the second set (and similarly for OSHA and ISO).

What is the best way to implement this? I thought of using a conkeyref with audience filtering and a conref to the default value if no specific value is found?
Radu
Posts: 9049
Joined: Fri Jul 09, 2004 5:18 pm

Re: DITA filtering with default content

Post by Radu »

Hi,

How about if you group them all in a DITA div:

Code: Select all

        <div id="reused_content">
            <p audience="ANSI">According to ANSI legislation ... </p>
            <p audience="OSHA">According to OSHA legislation ... </p>
            <p audience="ISO">According to ISO legislation ... </p>
            <p audience="FALLBACK">Refer to local legislation.</p>
        </div>
and add an extra audience of "FALLBACK" to the last paragraph so that you have enough information to filter each case using a DITAVAL filter file?

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply