<searchtitle>

A search title is an alternative title that is displayed by search tools.

Usage information

A search title is useful when the topic has a title that makes sense in the context of a single information set, but might be too general in a list of search results. For example, a topic title of Markup example makes sense as part of a guide about DITA, but when found among thousands of unrelated topics, a search title of DITA markup example is more useful.

The <searchtitle> element is a convenience element. It is equivalent to a <titlealt> element with @title-role set to search.

Processing expectations

Processing expectations are dictated by the rules for the <titlealt> element.

Specialization hierarchy

The <searchtitle> element is specialized from <titlealt>. It is defined in the alternative-titles domain module.

Content model

(Text | <data> | <sort-as> | <foreign> | <keyword> | <term> | <text> | <ph> | <strong> | <em> | <b> | <i> | <line-through> | <overline> | <sup> | <sub> | <tt> | <u> | <draft-comment> | <required-cleanup> )*

Attributes

The following attributes are available on this element: universal attributes and @title-role.

For this element, @title-role has a default value of search.

The following attributes are available on this element: universal attributes and the attributes defined below.

@title-role (REQUIRED)
Specifies the role that the alternative title serves. Multiple roles are separated by white space. The following roles are defined in the specification: linking, navigation, search, subtitle, and hint.

Processors can define custom values for the @title-role attribute.

For this element, @title-role has a default value of search.

Examples

This section is non-normative.

This section contains examples of how the <searchtitle> element can be used.

Example 1. Search title used in a topic

In the following code sample, the title "Programming Example" is useful in a set of information about XSLT basics; however, the same title is not helpful among a set of search results from the entire Internet. In the latter case, a title of "Example of basic programming in XSLT" is more useful:

<topic id="programming-example">
  <title>Programming example</title>
  <prolog>
    <searchtitle>Example of basic programming in XSLT</searchtitle>
  </prolog>
  <body> 
    <!-- ... -->  
  </body>
</topic>
Example 2. Search title used in a map

When <searchtitle> is used in maps, the element provides a new search title for the topic when used in that specific context. For example, if the following code sample is from a map that includes information about programming in many languages, searches among that information set will be most useful when they return "Example of programming in XSLT":

<topicref href="programming-example.dita">
  <topicmeta>
    <navtitle>Programming example</navtitle>
    <searchtitle>Example of programming in XSLT</searchtitle>
  </topicmeta>
</topicref>