Map Specialization Tutorial

Goal: Define a new map type that represents an FAQ publication.

Having defined a new topic type for FAQ questions (Topic Specialization Tutorial), we can now define a corresponding map type for creating complete FAQ sets.

New map types are used to either represent specific types of publications (what most people would call a "document type" in the generic sense, not the XML sense) or to represent specific combinations of topic types. For example, a common pattern is to combine a task with associated concept and reference topics into a single unit. It could be useful to define a separate map type that codifies this structure1

For this tutorial, we want to define frequently asked question publications that consist of FAQ question topics.

While you could do this by defining a new map type that defined topicref types specifically for organizing FAQ entries, in practice it is usually better to define new topicref types as map domains so they can be used in any map type. If you still want a specific map type you can define a map type that depends on the new map domain in order to define appropriately-constrained content models.

The Learning and Training learningMapDomain and learningMap modules are a good example of this approach. The learningMap domain lets you use learning-specific topicrefs in any map type while the learningMap gives you a ready-to-use map specifically for learning content. The DITA for Publishers vocabulary takes the same approach with the publication map domains and pubmap map types.

Thus, this tutorial defines two vocabulary modules:
  • An FAQ map domain that defines new topic types for organizing sets of FAQ entries
  • An FAQ map type that uses the map domain to define a map that is exclusively an FAQ set.

To implement the domain and the map type that uses it, we could start by defining the map domain and then defining the map type that uses it. However, the principle of test-driven development suggests that we start with the map type and work toward implementing the map domain.