• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Learning DITA

Free DITA training

Free DITA training

  • Log in
  • Register
  • Newsletter
  • Profile
  • Privacy
  • Home
  • About
  • Courses
  • News
  • Resources
    • Recordings
  • Questions?
  • Contact

What can you filter?

Posted on 12.02.16

Advanced reuse in DITA Lesson 1: Using conditions What can you filter?

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.

In DITA topics, some of the elements you can filter are:

  • sections
  • paragraphs
  • ordered and bulleted lists
  • list items
  • notes
  • tables
  • table rows
  • figures
  • images
In DITA maps and bookmaps, some of the elements you can filter are:

  • 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

There are a number of elements that cannot be filtered out. These include:

  • topic titles
  • individual table <entry> elements
  • step command (<cmd>) elements
  • choicetable entries
Contributors
  • Simon Bate
  • Jake Campbell
  • Gretyl Kinsey
Previous Topic
Back to Lesson
Next Topic

sidebar

Blog Sidebar

  • Scriptorium logo
    Maximize the value of your content. Read more.
  • Scriptorium logo
    Already in DITA and need support? Contact us.
RSSLinkedin

Want to add content? Join the ditatraining GitHub repository.

  • Home
  • News
  • Contact
  • Privacy
  • Cookie Policy

Maintained by Scriptorium Publishing

Logo and site presentation © 2015–2023 Scriptorium Publishing. Content based on the open-source DITA training project.

Manage Cookie Consent
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
Functional Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
Manage options Manage services Manage vendors Read more about these purposes
View preferences
{title} {title} {title}
Manage Cookie Consent
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent may adversely affect certain features and functions.
Functional Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
Manage options Manage services Manage vendors Read more about these purposes
View preferences
{title} {title} {title}