How is content variation handled in reused DITA tables?
Handling content variation in reused DITA tables involves using conditional processing, profiling attributes, and filtering techniques to tailor the content for different contexts while maintaining a single source for the table. This ensures that different versions of the same table can be presented within distinct topics, accommodating varying needs without duplicating content.
Methods for Handling Content Variation
Content variation is handled by conditional processing, profiling attributes, and filtering techniques.
Conditional Processing
Conditional processing allows inclusion or exclusion of specific content based on conditions defined in DITA documents.
To handle content variation in reused tables, conditional processing instructions can be used to include or exclude rows, columns, or individual cells in the table.
Profiling Attributes
Profiling attributes are used to mark sections of content for conditional processing.
Assign profiling attributes to different parts of the table to categorize content that needs to be varied based on different contexts.
Filtering Techniques
Filters can be applied when publishing or generating output from DITA sources.
Using filters, which profiling conditions should be active for a particular output can be specified.
By configuring the filter settings during output generation, which version of the table is displayed based on the defined profiling attributes can be controlled.
Example: Handling Content Variation in a Product Features Table
A DITA table lists product features and needs to present different versions of this table based on the product line. This content variation can be handled by creating the table, using conditional processing, assigning profiling attributes, and generating output.
product-features.dita
<topic id="product-features">
<title>Product Features</title>
<table>
<title>Product Features</title>
<tgroup cols="2">
<thead>
<row>
<entry>Feature</entry>
<entry>Description</entry>
</row>
</thead>
<tbody>
<!-- Common features -->
<row>
<entry conkeyref="common-feature">Cross-platform compatibility</entry>
<entry>Works on various operating systems.</entry>
</row>
<row>
<entry conkeyref="common-feature">User-friendly interface</entry>
<entry>Intuitive design for easy navigation.</entry>
</row>
</tbody>
</tgroup>
</table>
</topic>
Use Conditional Processing
<row>
<entry conkeyref="common-feature">Cross-platform compatibility</entry>
<entry>Works on various operating systems.</entry>
</row>
<row>
<entry conkeyref="common-feature">User-friendly interface</entry>
<entry>Intuitive design for easy navigation.</entry>
</row>
Apply Profiling Attributes
<row conaction="exclude" conkeyref="productA">
<entry conaction="exclude">Customizable settings</entry>
<entry conaction="exclude">Tailor the product to your needs.</entry>
</row>
<row conkeyref="productB">
<entry>Advanced security features</entry>
<entry>Enhanced protection against threats.</entry>
</row>
Output Generation
When generating output for a specific product, configure the filters to activate the relevant profiling attributes. For example, for Product A, activate “productA” profiling; for Product B, activate “productB” profiling.