DITA Resource Center

topicsetref

The <topicsetref> element references a <topicset> element. The referenced <topicset> element can be defined in the current map or in another map.

When possible, applications should treat the referenced <topicset> as an independent unit that always retains its identity. For example, an application that renders DITA for a dynamic navigation platform may generate a reusable navigation structure for each <topicset>, and each <topicsetref> is retained as a reference to that structure. This differs slightly from the processing of the conref attribute, which results in a literal copy of the referenced content.

For situations that do not support reusing a topic set as an independent unit, such as a rendered PDF, applications may resolve the <topicsetref> element in a manner similar to other <topicref> elements that have the format attribute set to "ditamap". This may result in a new instance of the <topicset> element.

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 ( (topicmeta) (optional) then (data or data-about or topicref or anchorref or keydef or mapref or topicgroup or topichead or topicset or topicsetref) (any number) )
map (technical content) ( (topicmeta) (optional) then (data or data-about or topicref or (anchorref or keydef or mapref or topicgroup or topichead or topicset or topicsetref) or (glossref) ) (any number) )
classifyMap ( (topicmeta) (optional) then (data or data-about or topicref or (topicsubject or topicapply) or (anchorref or keydef or mapref or topicgroup or topichead or topicset or topicsetref) ) (any number) )
subjectScheme ( (topicmeta) (optional) then (data or data-about or topicref or (anchorref or keydef or mapref or topicgroup or topichead or topicset or topicsetref) ) (any number) )
learningBookmap, learningMap ( (topicmeta) (optional) then (data or data-about or topicref or anchorref or keydef or mapref or topicgroup or topichead or topicset or topicsetref or learningObject or learningGroup) (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/topicsetref

Example

Reusable chunk of information in a ditamap

The following <topicset> groups several topics that together make up an overview of SQL.

<topicset id="sqlbasics" href="sqlOverview.dita">
  <topicref href="sqlSelection.dita"/>
  <topicref href="sqlJoin.dita"/>
  <topicref href="sqlFilter.dita"/>
  <!-- ... -->
</topicset>

<topicsetref> element that reuses the chunk from within the same map

In this case, another map includes the entire set of SQL Basics together with content related to programming with JDBC.

<topichead navtitle="Mastering JDBC">
  <topicsetref href="#sqlbasics"/>
  <topicref href="jdbcPrepare.dita"/>
  <!-- ... -->
</topichead>

Result of the reuse

A reader of the JDBC information will see the content integrated as a single unit.

<topichead navtitle="Mastering JDBC">
  <topicset id="sqlbasics" href="sqlOverview.dita">
    <topicref href="sqlSelection.dita"/>
    <topicref href="sqlJoin.dita"/>
    <topicref href="sqlFilter.dita"/>
    <!-- ... -->
  </topicset>
  <topicref href="jdbcPrepare.dita"/>
  <!-- ... -->
</topichead>

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 topicset represented by the <topicsetref>. CDATA #IMPLIED No
keys Introduces one or more global identifiers for a resource referenced from a map. See The keys attribute for details on how to use the keys attribute. NMTOKEN #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
collection-type Collection types describe how links relate to each other. The processing default is "unordered", although no default is specified in the DTD or Schema.
unordered
Indicates that the order of the child topics is not significant.
sequence
Indicates that the order of the child topics is significant; output processors will typically link between them in order.
choice
Indicates that one of the children should be selected.
family
Represents a tight grouping in which each of the referenced topics not only relates to the current topic but also relate to each other.
-dita-use-​conref-​target
See Using the -dita-use-conref-target value for more information.

Usage of the collection-type attribute on <reltable> and <relcolspec> is currently undefined and reserved for future use.

(unordered | sequence | choice | family | -dita-use-​conref-​target) #IMPLIED No
processing-role Describes the processing role of the referenced topic. The processing default is "normal". If the value is not specified locally, but is specified on an ancestor, the value will cascade from the closest ancestor.
normal
Normal topic that is a readable part of the information.
resource-only
The topic is used as a resource for processing purposes, but is not a readable unit of information on its own. This topic should not be included in a rendered table of contents, and the topic should not be rendered on its own.
-dita-use-​conref-​target
See Using the -dita-use-conref-target value for more information.
(normal | resource-only | -dita-use-​conref-​target) #IMPLIED No
type Describes the target of a reference. For the topicsetref element, this value defaults to "topicset". See The type attribute for detailed information on other supported values and processing implications. CDATA topicset No
scope The scope attribute identifies the closeness of the relationship between the current document and the target resource. See The scope attribute for more information on values. (local | peer | external | -dita-use-​conref-​target) #IMPLIED No
locktitle If locktitle is set to "yes", the <navtitle> element or @navtitle attribute is used if it is present. Otherwise, the navtitle is ignored and the navigation title is retrieved from the referenced file.

note

The @navtitle attribute is deprecated in favor of the <navtitle> element. When both a <navtitle> element and a navtitle attribute are specified, the <navtitle> element should be used.
yes
The navtitle in the map is used.
no
The navtitle or title of the topic is used. This is the processing default.
-dita-use-​conref-​target
See Using the -dita-use-conref-target value for more information.
(yes | no | -dita-use-​conref-​target) #IMPLIED No
format The format attribute identifies the format of the resource being referenced. For the topicsetref element, this value defaults to "ditamap", because the element typically references a branch of a map. See The format attribute for details on other supported values. CDATA ditamap No
linking Defines some specific linking characteristics of a topic's current location in the map. If the value is not specified locally, but is specified on an ancestor, the value will cascade from the closest ancestor.
targetonly
A topic can only be linked to and cannot link to other topics.
sourceonly
A topic cannot be linked to but can link to other topics.
normal
A topic can be linked to and can link to other topics. Use this to override the linking value of a parent topic.
none
A topic cannot be linked to or link to other topics.
-dita-use-​conref-​target
See Using the -dita-use-conref-target value for more information.
(targetonly | sourceonly | normal | none | -dita-use-​conref-​target) #IMPLIED No
toc Specifies whether a topic appears in the table of contents (TOC). If the value is not specified locally, but is specified on an ancestor, the value will cascade from the closest ancestor. (yes | no | -dita-use-​conref-​target) #IMPLIED No
print Specifies whether the topic should be included in a print-specific rendition, such as PDF. The processing default is "yes". If the value is not specified locally, but is specified on an ancestor, the value will cascade from the closest ancestor.
yes
Include the topic in the print-oriented file.
no
Do not include the topic in a print-oriented file.
printonly
Only include the topic when rendering the DITA content in a print-oriented context; the topic should not be included in other contexts, such as when rendering as HTML.
-dita-use-​conref-​target
See Using the -dita-use-conref-target value for more information.
(yes | no | printonly | -dita-use-​conref-​target) #IMPLIED No
search Describes whether the target is available for searching. If the value is not specified locally, but is specified on an ancestor, the value will cascade from the closest ancestor.
yes
no
-dita-use-​conref-​target
(yes | no | -dita-use-​conref-​target) #IMPLIED No
chunk When a set of topics is transformed using a map, the chunk attribute allows multi-topic documents to be broken into smaller files and multiple individual topics to be combined into larger combined documents.

For a detailed description of the chunk attribute and its usage, see Chunking in the DITA Architectural Specification.

CDATA #IMPLIED No
univ-atts attribute group (includes select-atts, id-atts, and localization-atts groups) A set of related attributes, described in univ-atts attribute group
global-atts attribute group (xtrf, xtrc) A set of related attributes, described in global-atts attribute group
class, outputclass, keyref Keyref provides a redirectable reference based on a key defined within a map. See The keyref attribute for information on using this attribute. Class and outputclass are described in Other common DITA attributes

Was this page helpful?