From f5fa3cd37d7aa3663e0fd3403915e9345d32ac51 Mon Sep 17 00:00:00 2001
From: Michael Smith <xmldoc@users.sourceforge.net>
Date: Wed, 4 Jul 2007 14:35:25 +0000
Subject: [PATCH] Made the dbfunclist PI work as intended. Also added doc for
 dbfunclist and dbcmdlist PIs.

---
 xsl/html/formal.xsl |  4 ++-
 xsl/html/pi.xsl     | 59 ++++++++++++++++++++++++++++++++++++---------
 2 files changed, 50 insertions(+), 13 deletions(-)

diff --git a/xsl/html/formal.xsl b/xsl/html/formal.xsl
index 2e45709c3..bb703d9ac 100644
--- a/xsl/html/formal.xsl
+++ b/xsl/html/formal.xsl
@@ -103,7 +103,9 @@
   <xsl:variable name="content">
     <div class="{$class}">
       <xsl:if test="$spacing.paras != 0"><p/></xsl:if>
-      <xsl:call-template name="anchor"/>
+      <xsl:call-template name="anchor">
+        <xsl:with-param name="conditional" select="0"/>
+      </xsl:call-template>
       <xsl:apply-templates/>
   
       <!-- HACK: This doesn't belong inside formal.object; it 
diff --git a/xsl/html/pi.xsl b/xsl/html/pi.xsl
index aaffeaff5..ae1f4868c 100644
--- a/xsl/html/pi.xsl
+++ b/xsl/html/pi.xsl
@@ -928,28 +928,62 @@
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template name="pi.dbfunclist">
-  <xsl:variable name="funcsynopses" select="..//funcsynopsis"/>
-  <xsl:if test="count($funcsynopses)&lt;1">
-    <xsl:message><xsl:text>No funcsynopsis elements matched dbfunclist PI, perhaps it's nested too deep?</xsl:text>
+<doc:pi name="dbcmdlist" xmlns="">
+  <refpurpose>Generates a hyperlinked list of commands</refpurpose>
+  <refdescription>
+    <para>Use the <tag>dbcmdlist</tag> PI as the child of a
+      <tag>refsynopsisdiv</tag> containing multiple
+      <tag>cmdsynopsis</tag> instances; a hyperlinked navigational
+      “command list” will be generated at the top of the
+      <tag>refsynopsisdiv</tag>, enabling users to quickly jump
+      to to each command synopsis.</para>
+  </refdescription>
+  <refsynopsisdiv>
+    <synopsis><tag class="xmlpi">dbcmdlist</tag></synopsis>
+  </refsynopsisdiv>
+  <refparameter>
+    <para>[No parameters]</para>
+  </refparameter>
+</doc:pi>
+<xsl:template name="pi.dbcmdlist">
+  <xsl:variable name="cmdsynopses" select="..//cmdsynopsis"/>
+  <xsl:if test="count($cmdsynopses)&lt;1">
+    <xsl:message><xsl:text>No cmdsynopsis elements matched dbcmdlist PI, perhaps it's nested too deep?</xsl:text>
     </xsl:message>
   </xsl:if>
   <dl>
-    <xsl:call-template name="process.funcsynopsis.list">
-      <xsl:with-param name="funcsynopses" select="$funcsynopses"/>
+    <xsl:call-template name="process.cmdsynopsis.list">
+      <xsl:with-param name="cmdsynopses" select="$cmdsynopses"/>
     </xsl:call-template>
   </dl>
 </xsl:template>
 
-<xsl:template name="pi.dbcmdlist">
-  <xsl:variable name="cmdsynopses" select="..//cmdsynopsis"/>
-  <xsl:if test="count($cmdsynopses)&lt;1">
-    <xsl:message><xsl:text>No cmdsynopsis elements matched dbcmdlist PI, perhaps it's nested too deep?</xsl:text>
+<doc:pi name="dbfunclist" xmlns="">
+  <refpurpose>Generates a hyperlinked list of functions</refpurpose>
+  <refdescription>
+    <para>Use the <tag>dbfunclist</tag> PI as the child of a
+      <tag>refsynopsisdiv</tag> containing multiple
+      <tag>funcsynopsis</tag> instances; a hyperlinked
+      navigational “function list” will be generated at the top of
+      the <tag>refsynopsisdiv</tag>, enabling users to quickly
+      jump to to each function synopsis.</para>
+  </refdescription>
+  <refsynopsisdiv>
+    <synopsis><tag class="xmlpi">dbfunclist</tag></synopsis>
+  </refsynopsisdiv>
+  <refparameter>
+    <para>[No parameters]</para>
+  </refparameter>
+</doc:pi>
+<xsl:template name="pi.dbfunclist">
+  <xsl:variable name="funcsynopses" select="..//funcsynopsis"/>
+  <xsl:if test="count($funcsynopses)&lt;1">
+    <xsl:message><xsl:text>No funcsynopsis elements matched dbfunclist PI, perhaps it's nested too deep?</xsl:text>
     </xsl:message>
   </xsl:if>
   <dl>
-    <xsl:call-template name="process.cmdsynopsis.list">
-      <xsl:with-param name="cmdsynopses" select="$cmdsynopses"/>
+    <xsl:call-template name="process.funcsynopsis.list">
+      <xsl:with-param name="funcsynopses" select="$funcsynopses"/>
     </xsl:call-template>
   </dl>
 </xsl:template>
@@ -1039,6 +1073,7 @@
        <dt>
        <a>
          <xsl:attribute name="href">
+           <xsl:text>#</xsl:text>
            <xsl:call-template name="object.id">
              <xsl:with-param name="object" select="$cmdsyn"/>
            </xsl:call-template>
-- 
2.40.0