Page 1 of 1

DITA filtering with default content

Posted: Mon Feb 01, 2021 6:03 pm
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?

Re: DITA filtering with default content

Posted: Tue Feb 02, 2021 12:05 pm
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