The DITA filtering mechanism is quite powerful and flexible. You can use it to filter out almost any type of element in DITA topics and in DITA maps.
- sections
- paragraphs
- ordered and bulleted lists
- list items
- notes
- tables
- table rows
- figures
- images
- topic references
- map references
- key definitions
- chapters and appendixes
- frontmatter, backmatter, and their elements
Where to be careful
There are two areas where you need to exercise some caution in filtering: inline elements and elements that have required children.
It is not a good idea to filter inline elements. This is mostly a localization concern. The previous course (Introduction to reuse in DITA) covered this to some degree: what makes sense in one language when it is filtered out might not make sense (or translate well) when it is presented in another language.
You need to be careful when filtering elements that have required children, otherwise this might result in an invalid structure. If filtering removes required elements, it will result in an invalid topic. For example, if you add conditional attributes to all <li> elements in an unordered list (<ul>) and filtering removes them all, the empty <ul> element will be invalid. Other elements that have required children include <ol>, <sl>, <steps>, <substeps>, <properties>, <table>, <simpletable>. If you are not sure which child elements are required, check the DITA 1.2 specification.
What you cannot filter
- topic titles
- individual table <entry> elements
- step command (<cmd>) elements
- choicetable entries