DITA filtering with default content

aaron
Posts: 8
Joined: Fri May 22, 2020 6:44 pm

DITA filtering with default content

Post by aaron » Mon Feb 01, 2021 6:03 pm

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: 7543
Joined: Fri Jul 09, 2004 5:18 pm

Re: DITA filtering with default content

Post by Radu » Tue Feb 02, 2021 12:05 pm

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