DITA maps for context-sensitive help plug-ins contain
<resourceid> elements,
each of which identifies a concrete help context ID associated with a DITA
topic.
The
<resourceid> element is a child of a
<topicmeta> element. For example:
<topicmeta>
<resourceid id="help_context_ID_string"/>
</topicmeta>
For each DITA topic associated with a help context ID, the
<topicref> element
that points to that topic contains a
<topicmeta> element (with a
<resourceid> child element).
This defines the association of a help context ID with that
topic. For example:
<topicref navtitle="label attribute in contexts.xml topic element"
href="path/to/topic.xml">
<topicmeta>
<resourceid id="help_context_ID_string"/>
</topicmeta>
</topicref>
Any DITA topic can be mapped to multiple help context IDs by inserting as many
<resourceid> child elements as necessary in the
<topicmeta> element. For example:
<topicref navtitle="label attribute in contexts.xml topic element"
href="path/to/topic.xml">
<topicmeta>
<resourceid id="help_context_ID_1"/>
<resourceid id="help_context_ID_2"/>
<resourceid id="help_context_ID_3"/>
</topicmeta>
</topicref>
It may be preferable to combine help contexts in the helpKey properties
file, instead of defining mapping for multiple help contexts to a single topic
in the DITA map. This is a judgment call for the Documentation team responsible
for maintaining the DITA map. For more information, see Defining Help Context
IDs.
Other considerations for DITA maps that define context-sensitive help plug-ins:
- Markup for context-to-topic mapping is needed only for the DITA topics that
will be context-sensitive help targets, that is, Related Topics shown in the Help
view.
- When a single DITA topic appears more than once in a map, only the first
instance of a <topicref> that points to that topic needs the
context-sensitive help markup.
- Nested maps that contribute DITA topics related to help contexts must include
the same context-sensitive help markup.