]> granicus.if.org Git - docbook-dsssl/commitdiff
Webhelp: Append document title to html/head/title
authorDavid Cramer <david@thingbag.net>
Wed, 20 Jun 2012 02:01:11 +0000 (02:01 +0000)
committerDavid Cramer <david@thingbag.net>
Wed, 20 Jun 2012 02:01:11 +0000 (02:01 +0000)
xsl/webhelp/xsl/webhelp-common.xsl

index 19d73b327412846e3e2d1dc489415862f9dfdf4b..ab0cdc83fa945f1a475918064144efa5a75b4db7 100644 (file)
@@ -84,6 +84,19 @@ set       toc,title
        Currently, only around 10 translations needed. -->
     <!-- Moved to files under 'gentext/locale/', search for WebHelp -->
     
+    <xsl:template name="user.head.title">
+      <xsl:param name="node" select="."/>
+      <xsl:param name="title">
+       <xsl:apply-templates select="$node" mode="object.title.markup.textonly"/>
+      </xsl:param>
+      <xsl:param name="document-title">
+       <xsl:apply-templates select="/*" mode="object.title.markup.textonly"/>
+      </xsl:param>
+
+      <title>
+       <xsl:copy-of select="$title"/> <xsl:if test="parent::*"> - <xsl:copy-of select="$document-title"/></xsl:if>
+      </title>
+    </xsl:template>
 
   <xsl:template name="system.head.content">
   <xsl:param name="node" select="."/>