]> granicus.if.org Git - postgresql/commitdiff
doc: Fix TOC generation for refentries
authorPeter Eisentraut <peter_e@gmx.net>
Wed, 15 Mar 2017 03:12:18 +0000 (23:12 -0400)
committerPeter Eisentraut <peter_e@gmx.net>
Wed, 15 Mar 2017 03:12:18 +0000 (23:12 -0400)
The XSLT stylesheets by default don't show refentries inside sections in
table of contents, which for our documentation leads to some regressions
compared to the DSSSL output.  For example, in the SPI chapter, which is
mostly refentries, you don't get any usable table of contents.  Tweak
things so it's mostly back to what it was before.

doc/src/sgml/stylesheet.xsl

index 42e8cce3688386ca0711c8282cd6f1647be26836..efcb80ffca2d8fe62b7977b61e68a28515828f1d 100644 (file)
@@ -63,6 +63,18 @@ section   toc
 set       toc,title
 </xsl:param>
 
+<xsl:param name="generate.section.toc.level" select="1"></xsl:param>
+
+<!-- include refentry under sect1 in tocs -->
+<xsl:template match="sect1" mode="toc">
+  <xsl:param name="toc-context" select="."/>
+  <xsl:call-template name="subtoc">
+    <xsl:with-param name="toc-context" select="$toc-context"/>
+    <xsl:with-param name="nodes" select="sect2|refentry
+                                         |bridgehead[$bridgehead.in.toc != 0]"/>
+  </xsl:call-template>
+</xsl:template>
+
 
 <!-- Put index "quicklinks" (A | B | C | ...) at the top of the bookindex page. -->