]> granicus.if.org Git - docbook-dsssl/commitdiff
Added several patches from W. Borgert
authorJirka Kosek <jirka@kosek.cz>
Thu, 19 Aug 2004 21:19:03 +0000 (21:19 +0000)
committerJirka Kosek <jirka@kosek.cz>
Thu, 19 Aug 2004 21:19:03 +0000 (21:19 +0000)
xsl/htmlhelp/htmlhelp-common.xsl

index 5a131d8a876618fc9ce5cb73d733948860479242..c1e3e26e2db82c5c3c9546bc753eb895f1228f7d 100644 (file)
 
 <xsl:variable name="htmlhelp.generate.index" select="//indexterm[1]"/>
 
+<xsl:variable name="raw.help.title">
+  <xsl:choose>
+    <xsl:when test="$htmlhelp.title = ''">
+      <xsl:choose>
+        <xsl:when test="$rootid != ''">
+          <xsl:apply-templates select="key('id',$rootid)" mode="title.markup"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:apply-templates select="/*" mode="title.markup"/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:value-of select="$htmlhelp.title"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:variable>
+
+<xsl:variable name="help.title" select="normalize-space($raw.help.title)"/>
+  
 <!-- ==================================================================== -->
 
 <xsl:template match="/">
@@ -174,21 +194,7 @@ Full-text search=Yes
 </xsl:for-each>
 <xsl:text>
 Title=</xsl:text>
-  <xsl:choose>
-    <xsl:when test="$htmlhelp.title = ''">
-      <xsl:choose>
-        <xsl:when test="$rootid != ''">
-          <xsl:apply-templates select="key('id',$rootid)" mode="title.markup"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:apply-templates select="/*" mode="title.markup"/>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:value-of select="$htmlhelp.title"/>
-    </xsl:otherwise>
-  </xsl:choose>
+  <xsl:value-of select="$help.title"/>
 <xsl:text>
 Enhanced decompilation=</xsl:text>
   <xsl:choose>
@@ -206,7 +212,9 @@ Enhanced decompilation=</xsl:text>
 [WINDOWS]
 </xsl:text>
 <xsl:value-of select="$htmlhelp.hhp.window"/>
-<xsl:text>=,"</xsl:text><xsl:value-of select="$htmlhelp.hhc"/>
+<xsl:text>="</xsl:text>
+<xsl:value-of select="$help.title"/>
+<xsl:text>","</xsl:text><xsl:value-of select="$htmlhelp.hhc"/>
 <xsl:text>",</xsl:text>
 <xsl:if test="$htmlhelp.generate.index">
   <xsl:text>"</xsl:text>
@@ -258,6 +266,26 @@ Enhanced decompilation=</xsl:text>
 </xsl:text>
 </xsl:if>
 
+<!-- 
+  Needs more investigation to generate propetly all fields 
+<xsl:text>search="</xsl:text>
+<xsl:value-of select="normalize-space(//title[1])"/>
+<xsl:text>","toc.hhc","index.hhk","</xsl:text>
+<xsl:value-of select="$root.filename"/>
+<xsl:text>.html","</xsl:text>
+<xsl:value-of select="$root.filename"/>
+<xsl:text>.html",,,,,</xsl:text>
+<xsl:value-of select="$xnavigation"/>
+<xsl:text>,</xsl:text>
+<xsl:value-of select="$htmlhelp.hhc.width"/>
+<xsl:text>,</xsl:text>
+<xsl:value-of select="$xbuttons"/>
+<xsl:text>,</xsl:text>
+<xsl:value-of select="$htmlhelp.window.geometry"/>
+<xsl:text>,,,,,2,,0
+</xsl:text>
+-->
+
 <xsl:if test="$htmlhelp.hhp.windows">
   <xsl:value-of select="$htmlhelp.hhp.windows"/>
 </xsl:if>