Index: /trunk/doc/manual/xhtml-qhelp.xsl
===================================================================
--- /trunk/doc/manual/xhtml-qhelp.xsl	(revision 86611)
+++ /trunk/doc/manual/xhtml-qhelp.xsl	(revision 86612)
@@ -12,4 +12,8 @@
   </xsl:text></xsl:variable>
 
+  <xsl:variable name="inputFileName">
+    <xsl:text>UserManual.xhtml</xsl:text>
+  </xsl:variable>
+
   <xsl:template match="/">
     <xsl:element name="QtHelpProject">
@@ -23,8 +27,9 @@
       <xsl:value-of select="$newline" />
       <xsl:element name="filterSection">
-        <!-- No keywords and toc for now -->
-        <!-- <xsl:value-of select="$newline" /> -->
-        <!-- <xsl:element name="toc"></xsl:element> -->
-        <!-- <xsl:value-of select="$newline" /> -->
+        <xsl:value-of select="$newline" />
+        <xsl:element name="toc">
+          <xsl:apply-templates select="//xhtml:div[@class='toc']//xhtml:span[@class='chapter']"/>
+        </xsl:element><!-- toc -->
+        <xsl:value-of select="$newline" />
         <!-- <xsl:element name="keywords"></xsl:element> -->
         <xsl:value-of select="$newline" />
@@ -39,5 +44,5 @@
           <!-- ====================single html input file========================== -->
           <xsl:element name="file">
-            <xsl:text>UserManual.xhtml</xsl:text>
+            <xsl:value-of select="$inputFileName" />
           </xsl:element>
           <xsl:value-of select="$newline" />
@@ -54,13 +59,17 @@
   </xsl:template>
 
+  <!-- ===================toc related template(s)====================== -->
   <xsl:template match="xhtml:span[@class='chapter']">
-    <xsl:element name="file">
-      <xsl:text>ch</xsl:text>
-      <xsl:value-of select="format-number(position(), '00')"/>
-      <xsl:text>.html</xsl:text>
+    <xsl:element name="section">
+      <xsl:attribute name="title">
+        <xsl:value-of select="*" />
+      </xsl:attribute>
+      <xsl:attribute name="ref">
+                    <xsl:value-of select="$inputFileName" /><xsl:value-of select="xhtml:a/@href" />
+      </xsl:attribute>
     </xsl:element>
     <xsl:value-of select="$newline" />
   </xsl:template>
-
+  <!-- ==============================================================   -->
 
   <xsl:template match="//xhtml:img">
