Reputation: 1778
I am currently working on a project to create a website with a FAQ section. The website will introduce about 12 concepts, each with an abbreviated version appearing in the FAQ section, linked to the full version on a separate webpage. I am using DITA-OT 4.1 for this project and have explored several methods to achieve this, but none have provided the desired result.
Here's a summary of the methods I've considered and the challenges associated with each:
Method | Description | Challenges |
---|---|---|
<abstract> | Create an abstract for each topic within the same DITA file. This would allow me to create a FAQ file that uses <conref> to include the abstract section of the 12 concepts. |
During the transformation process, these abstracts are typically included in each concept's corresponding webpage, not just in the FAQ page, which is not desirable. Excluding these abstracts using CSS or a custom plugin is possible, but it adds complexity to the process. |
@audience | Categorize content for different audiences, treating the shorter and longer versions as content for distinct audiences. This can be achieved by creating two separate project files (either in YAML or XML format) with different ditaval filters to produce two versions of the content. | This project-level categorical changes the output website, not surgical modifications to part of the website section. It works if you want 2 websites, rather than 1 website with a faq section that has the abbreviation. There is no equivalent way to filter content in ditamap†. |
Alternate Versions of Topics or DITA Maps | Create an alternate, shorter version of each topic or use the <topicmeta> element in a DITA map to replace the content or abstract of each topic. |
This method poses a challenge in maintaining consistency between the short and full versions of each topic, as they would be in separate files. This increases the risk of updates being made to one version without being reflected in the other. |
† There is an audience
attribute in topicref
and an audience
element in topicmeta
, but none of them filters. They are probably designed to be used with a filter in a project-level configuration.
Upvotes: 1
Views: 93
Reputation: 1278
Not sure if I really understand the use case correctly. Maybe filtering is not what you are looking for at all and you want to place your reusable content in another topic, where you collect your reusable elements. Afterwards you can use a content key reference to reuse the element, for example a <p>
element, in your table and wherever else you want. You can find an example here.
Upvotes: 0
Reputation: 1924
You cannot profile/filter content based on the <audience> element, it is used mostly as metadata. The @audience attribute is a profiling/filter attribute when used on a topicref in a DITA Map: https://www.oxygenxml.com/dita/1.3/specs/archSpec/base/conditional-processing-attributes.html But in general it filters based on the DITAVAL filter file you set globally.
There is a DITA 1.3 standard feature named branch filtering which would allow you to apply a ditaval filter on a specific portion from your DITA Map: https://www.oxygenxml.com/dita/1.3/specs/archSpec/base/branch-filtering.html
Upvotes: 1