3.1.2.1.1 map

The <map> element describes the relationships among a set of resources, such as DITA topics. Maps consist of references to topics, maps, and other resources organized into hierarchies, groups, and tables. Maps express these relationships in a single common format that can be used for different outputs.

The containing element for a map is the <map> element. Within the map, use the <topicref> element to add and organize references to the topics, and the <topicgroup> and <reltable> elements to provide non-hierarchical relationships. You can use the <map> element to set default attribute values for all <topicref> elements in the map.

A map describes the relationships among a set of DITA topics. The following are some examples of relationships that can be described in a map:
  • Hierarchical (Parent/Child). Nested topics create a hierarchical relationship. The topic that does the nesting is the parent, and the topics that are nested are the children.
  • Ordered. Child topics can be labeled as having an ordered relationship, which means they are referenced in a definite sequence.
  • Family. Child topics can be labeled as having a family relationship, which means they all refer to each other.

When rendering a map, processors may make use of these relationships, such as to create a Table of Contents (TOC), aggregate topics into a PDF document, or create links between topics in output.

The title element may optionally be used to provide a title for the map (the title element is preferred over the title attribute). In some scenarios the title is purely informational, and is present as an aid to the author. In other scenarios it may be useful or even required. For example, if a map is converted to Eclipse Help, the Eclipse system will require a title for the resulting table of contents. In the bookmap specialization of map, the <title> element provides a title for the book represented by that map.

Contains

Note: These models represent only the default document types distributed by OASIS. Actual content models will differ with each new document type.
Doctype Content model
map (base), bookmap ( (title) (optional) then (topicmeta) (optional) then (anchor or data or data-about or navref or reltable or topicref or anchorref or keydef or mapref or topicgroup or topichead or topicset or topicsetref) (any number) )
map (technical content) ( (title) (optional) then (topicmeta) (optional) then (anchor or data or data-about or navref or reltable or topicref or (anchorref or keydef or mapref or topicgroup or topichead or topicset or topicsetref) or (glossref) ) (any number) )
classifyMap ( (title) (optional) then (topicmeta) (optional) then (anchor or data or data-about or navref or reltable or (topicSubjectTable) or topicref or (topicsubject or topicapply) or (anchorref or keydef or mapref or topicgroup or topichead or topicset or topicsetref) ) (any number) )
subjectScheme ( (title) (optional) then (topicmeta) (optional) then (anchor or data or data-about or navref or reltable or topicref or (anchorref or keydef or mapref or topicgroup or topichead or topicset or topicsetref) ) (any number) )
learningBookmap, learningMap ( (title) (optional) then (topicmeta) (optional) then (anchor or data or data-about or navref or reltable or topicref or anchorref or keydef or mapref or topicgroup or topichead or topicset or topicsetref or learningObject or learningGroup) (any number) )

Contained by

This element is not contained by any other elements.

Inheritance

- map/map

Example

In this example, there are six topicrefs. They are nested and have a hierarchical relationship. The file bats.dita is the parent topic and the other topics are its children. The hierarchy could be used to generate a PDF, a navigation pane in an information center, a summary of the topics, or related links between the parent topic and its children.

<map id="mybats">
  <title>Bats</title>
  <topicref href="bats.dita" type="topic">
    <topicref href="batcaring.dita" type="task"></topicref>
    <topicref href="batfeeding.dita" type="task"></topicref>
    <topicref href="batsonar.dita" type="concept"></topicref>
    <topicref href="batguano.dita" type="reference"></topicref>
    <topicref href="bathistory.dita" type="reference"></topicref>
  </topicref>
</map>

Attributes

Name Description Data Type Default Value Required?
title An identifying title for the map. May be used or ignored, depending on the capabilities of the display mechanism. Note that beginning with DITA 1.1, the map can include a title element, which is preferred over the title attribute. CDATA #IMPLIED No
id Allows an ID to be specified for the map. Note that maps do not require IDs (unlike topics), and the map ID is not included in references to elements within a map. ID #IMPLIED No
conref This attribute is used to reference an ID on a map that can be reused. See The conref attribute for examples and details about the syntax. CDATA #IMPLIED No
anchorref Identifies a location within another map file where this map will be anchored at runtime. Resolution of the map is deferred until the final step in the delivery of any rendered content. For example, anchorref="map1.ditamap/a1" causes this map to be pulled into the location of the anchor point "a1" inside map1.ditamap when map1.ditamap is rendered for delivery. CDATA #IMPLIED No
xmlns:ditaarch Declares the default DITA namespace.   "http://dita.​oasis-open.​org/​architecture/​2005/"  
DITAArchVersion Designates the version of the architecture that is in use. The default value will increase with each release of DITA. CDATA "1.2" No
domains Indicates the specialized domains that are included in the DTD or Schema. This value will differ depending on what domains are included in the current DTD or Schema. CDATA Varies based on the DTD or Schema; a sample value is "(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d) (topic ut-d) (topic indexing-d)" No
topicref-atts attribute group (collection-type, processing-role, type, scope, locktitle, format, linking, toc, print, search, chunk) A set of related attributes. See topicref-atts, topicref-atts-no-toc, and topicref-atts-without-format attribute groups.      
select-atts attribute group (props, base, platform, product, audience, otherprops, importance, rev, status) A set of related attributes, described in select-atts attribute group      
localization-atts attribute group (translate, xml:lang, dir) A set of related attributes, described in localization-atts attribute group.      
global-atts attribute group (xtrf, xtrc) A set of related attributes, described in global-atts attribute group      
class, outputclass Common attributes described in Other common DITA attributes      

Return to main page.

OASIS DITA Version 1.2 -- OASIS Standard, 1 December 2010
Copyright © OASIS Open 2005, 2010. All Rights Reserved.