Difficulty: ★☆☆ (easy)
Keywords: documentation title, get.doc.title

Problem

You need to get the documentation title as a string.

Solution

Use the named template get.doc.title (from common/utilities.xsl):

<xsl:template match="...">
   <xsl:variable name="doctitle">
     <xsl:call-template name="get.doc.title"/>
   </xsl:variable>
   <!-- ... use the varialbe $doctitle ...-->
</xsl:template>

Discussion

The documentation title is the outmost title of your text. This can be a title from a book, glossary, set, article, or other, depending on the root element.

The get.doc.title template returns a string. In most cases this is probably enough, for example, if you want to use it as an attribute value where markup is not allowed.

If you need the full markup, use the methods described in Section 2.5, “Accessing Title Contents”.

See Also


Project@GitHubIssue#7