]> granicus.if.org Git - docbook-dsssl/commitdiff
Added parameter htmlhelp.default.topic for overriding default topic to display.
authorJirka Kosek <jirka@kosek.cz>
Sun, 10 Feb 2002 10:21:22 +0000 (10:21 +0000)
committerJirka Kosek <jirka@kosek.cz>
Sun, 10 Feb 2002 10:21:22 +0000 (10:21 +0000)
xsl/html/Makefile.param
xsl/html/param.ent
xsl/html/param.xweb
xsl/htmlhelp/htmlhelp.xsl
xsl/params/htmlhelp.default.topic.xml [new file with mode: 0644]

index a55bbfbfd9a86a2f0d1ca62659ed2cec643b4d21..c515edb039798317b1def731a14a5c6b45247791 100644 (file)
@@ -67,6 +67,7 @@ PARAMS=../params/admon.graphics.xml \
        ../params/htmlhelp.alias.file.xml \
        ../params/htmlhelp.autolabel.xml \
        ../params/htmlhelp.chm.xml \
+       ../params/htmlhelp.default.topic.xml \
        ../params/htmlhelp.encoding.xml \
        ../params/htmlhelp.enumerate.images.xml \
        ../params/htmlhelp.force.map.and.alias.xml \
index ddef8bcd69b273179db9dd472185236971c112e6..4d4452a02e9dc538b776859a86f3d24f496c533d 100644 (file)
@@ -67,6 +67,7 @@
 <!ENTITY htmlhelp.alias.file SYSTEM "../params/htmlhelp.alias.file.xml">
 <!ENTITY htmlhelp.autolabel SYSTEM "../params/htmlhelp.autolabel.xml">
 <!ENTITY htmlhelp.chm SYSTEM "../params/htmlhelp.chm.xml">
+<!ENTITY htmlhelp.default.topic SYSTEM "../params/htmlhelp.default.topic.xml">
 <!ENTITY htmlhelp.encoding SYSTEM "../params/htmlhelp.encoding.xml">
 <!ENTITY htmlhelp.enumerate.images SYSTEM "../params/htmlhelp.enumerate.images.xml">
 <!ENTITY htmlhelp.force.map.and.alias SYSTEM "../params/htmlhelp.force.map.and.alias.xml">
index 4f8c77ea1797f2ca76c657d7005bb009295dbd05..44e78349f1ba8fd9deeec5a35cb811b47227ffee 100644 (file)
@@ -252,6 +252,7 @@ to be incomplete. Don't forget to read the source, too :-)</para>
 &htmlhelp.encoding;
 &htmlhelp.autolabel;
 &htmlhelp.chm;
+&htmlhelp.default.topic;
 &htmlhelp.hhp;
 &htmlhelp.hhc;
 &htmlhelp.hhp.tail;
@@ -357,6 +358,7 @@ around all these parameters.</para>
 <src:fragref linkend="htmlhelp.alias.file.frag"/>
 <src:fragref linkend="htmlhelp.autolabel.frag"/>
 <src:fragref linkend="htmlhelp.chm.frag"/>
+<src:fragref linkend="htmlhelp.default.topic.frag"/>
 <src:fragref linkend="htmlhelp.encoding.frag"/>
 <src:fragref linkend="htmlhelp.enumerate.images.frag"/>
 <src:fragref linkend="htmlhelp.force.map.and.alias.frag"/>
index d9b64adbfb7622acdf30b2dd624008ed35cbc8cc..7c35997885b89b7a10cf9609eec0388c8b58c7cd 100644 (file)
 Compiled file=</xsl:text><xsl:value-of select="$htmlhelp.chm"/><xsl:text>
 Contents file=</xsl:text><xsl:value-of select="$htmlhelp.hhc"/><xsl:text>
 Default topic=</xsl:text>
- <xsl:call-template name="make-relative-filename">
-   <xsl:with-param name="base.dir" select="$base.dir"/>
-   <xsl:with-param name="base.name">
-     <xsl:choose>
-       <xsl:when test="$rootid != ''">
-         <xsl:apply-templates select="key('id',$rootid)" mode="chunk-filename"/>
-       </xsl:when>
-       <xsl:otherwise>
-         <xsl:apply-templates select="/" mode="chunk-filename"/>
-       </xsl:otherwise>
-     </xsl:choose>
-   </xsl:with-param>
- </xsl:call-template>
+<xsl:choose>
+  <xsl:when test="$htmlhelp.default.topic != ''">
+    <xsl:value-of select="$htmlhelp.default.topic"/>
+  </xsl:when>
+  <xsl:otherwise>
+    <xsl:call-template name="make-relative-filename">
+      <xsl:with-param name="base.dir" select="$base.dir"/>
+      <xsl:with-param name="base.name">
+        <xsl:choose>
+          <xsl:when test="$rootid != ''">
+            <xsl:apply-templates select="key('id',$rootid)" mode="chunk-filename"/>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:apply-templates select="/" mode="chunk-filename"/>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:with-param>
+    </xsl:call-template>
+  </xsl:otherwise>
+</xsl:choose>
 <xsl:text>
 Display compile progress=No
 Full-text search=Yes
diff --git a/xsl/params/htmlhelp.default.topic.xml b/xsl/params/htmlhelp.default.topic.xml
new file mode 100644 (file)
index 0000000..9350d7b
--- /dev/null
@@ -0,0 +1,31 @@
+<refentry id="htmlhelp.default.topic">
+<refmeta>
+<refentrytitle>htmlhelp.default.topic</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.default.topic</refname>
+<refpurpose>Name of file with default topic</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='htmlhelp.default.topic.frag'>
+<xsl:param name="htmlhelp.default.topic" select="''"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Normally first chunk of document is displayed when you open HTML
+Help file. If you want to display another topic, simply set its
+filename by this parameter.</para>
+
+<para>This is useful especially if you don't generate ToC in front of
+your document and you also hide root element in ToC. E.g.:</para>
+
+<programlisting><![CDATA[<xsl:param name="generate.book.toc" select="0"/>
+<xsl:param name="htmlhelp.hhc.show.root" select="0"/>
+<xsl:param name="htmlhelp.default.topic" select="'pr01.html'"/>]]></programlisting>
+
+</refsect1>
+</refentry>