3.1.2.2.3 mapref

The <mapref> element is a convenience element that is equivalent to a <topicref> element with the format attribute set to "ditamap". The hierarchy of the referenced map is merged into the container map at the position of the reference, and the relationship tables of the child map are added to the parent map.

Contains

Doctype

Content model

map, bookmap, classifyMap, subjectScheme, learningBookmap, learningMap

( (topicmeta) (optional) then (data or data-about) (any number) )

Contained by

Doctype

Content model

map (base), map (technical content), learningMap

map, topicref, relcolspec, relcell, topichead, topicgroup, anchorref, topicset, topicsetref, keydef

bookmap, learningBookmap

map, topicref, relcolspec, relcell, frontmatter, backmatter, draftintro, preface, chapter, part, appendix, notices, glossarylist, topichead, topicgroup, anchorref, topicset, topicsetref, keydef

classifyMap

map, topicref, relcolspec, relcell, topichead, topicgroup, anchorref, topicset, topicsetref, keydef, topicsubject, topicapply, topicCell, subjectCell

subjectScheme

map, topicref, relcolspec, relcell, subjectScheme, hasNarrower, hasKind, hasPart, hasInstance, hasRelated, subjectdef, subjectHead, relatedSubjects, subjectRole, topichead, topicgroup, anchorref, topicset, topicsetref, keydef

Inheritance

+ map/topicref mapgroup-d/mapref

Example

Figure 3-15 Sample document "lib.ditamap" that is reusable in other locations

<map id="lib">
  <topicref href="netlib.dita"/>
  <topicref href="dblib.dita"/>
  <!-- ... -->
</map>

Figure 3-16 Map that reuses lib.ditamap

<map id="standardlib">
  <topichead navtitle="Developing with standard libraries">
    <mapref href="lib.ditamap"/>
  </topichead>
  <!-- ... -->
</map>

Figure 3-17 Rendered result

<map id="standardlib">
  <topichead navtitle="Developing with standard libraries">
    <topicref href="netlib.dita"/>
    <topicref href="dblib.dita"/>
    <!-- ... -->
  </topichead>
  <!-- ... -->
</map>
Attributes

Name

Description

Data Type

Default Value

Required?

navtitle

Specifies the title of the topic as it will appear in the navigation or tables of contents that are generated from the map. Beginning with DITA 1.2, the preferred way to specify the navigation title in a map is with the navtitle element, available inside the topicmeta element.

CDATA

#IMPLIED

No

href

A pointer to the resource represented by the <topicref>. See 3.4.2.1 The href attribute for detailed information on supported values and processing implications. References to DITA content cannot be below the topic level: that is, you cannot reference individual elements inside a topic. References to content other than DITA topics should use the format attribute to identify the kind of resource being referenced.

CDATA

#IMPLIED

No

keys

Introduces one or more global identifiers for a resource referenced from a map. See 3.4.2.2 The keys attribute for details on how to use the keys attribute.

NMTOKEN

#IMPLIED

No

keyref

Keyref provides a redirectable reference based on a key defined within a map. See 3.4.2.3 The keyref attribute for information on using this attribute.

CDATA

#IMPLIED

No

query

This attribute is deprecated. It may be removed in the future.

CDATA

#IMPLIED

No

copy-to

Use the copy-to attribute on the <topicref> element to provide a different file name for a particular instance of the topic in the map (for example, to separate out the different versions of the topic, rather than combining them on output). The links and navigation associated with that instance will point to a copy of the topic with the file name you specified. Use the <

linktext> and <shortdesc> in the <topicref>'s <topicmeta> to provide a unique name and short description for the new copy.

CDATA

#IMPLIED

No

format

The format attribute identifies the format of the resource being referenced. For elements like this one that are designed to reference another map, the value defaults to "ditamap". See 3.4.2.9 The format attribute for details on other supported values.

CDATA

ditamap

No

topicref-atts-without-format attribute group (collection-type, processing-role, type, scope, locktitle, linking, toc, print, search, chunk)

A related set of attributes. See 3.4.1.8 topicref-atts, topicref-atts-no-toc, and topicref-atts-without-format attribute groups.

     

univ-atts attribute group (includes select-atts, id-atts, and localization-atts groups)

A set of related attributes, described in 3.4.1.3 univ-atts attribute group

     

global-atts attribute group (xtrf, xtrc)

A set of related attributes, described in 3.4.1.2 global-atts attribute group

     

class, outputclass

Common attributes described in 3.4.1.9 Other common DITA attributes

     

Previous Topic:  3.1.2.2.2 keydef

Next Topic:  3.1.2.2.4 topicgroup

Parent Topic:  3.1.2.2 Map group elements

Sibling Topics:

3.1.2.2.1 anchorref

3.1.2.2.2 keydef

3.1.2.2.4 topicgroup

3.1.2.2.5 topichead

3.1.2.2.6 topicset

3.1.2.2.7 topicsetref