]> granicus.if.org Git - docbook-dsssl/commitdiff
Refined XPath statements and notification messages for refentry
authorMichael Smith <xmldoc@users.sourceforge.net>
Thu, 13 Apr 2006 23:30:16 +0000 (23:30 +0000)
committerMichael Smith <xmldoc@users.sourceforge.net>
Thu, 13 Apr 2006 23:30:16 +0000 (23:30 +0000)
metadata handling.

xsl/common/common.xsl
xsl/common/refentry.xsl
xsl/manpages/docbook.xsl
xsl/manpages/other.xsl

index 6b86769e5536a889e74aa0029f68c07a101b8e77..6ce995b55b7e7f3dda9b645d9052d5005de79681 100644 (file)
@@ -1,10 +1,9 @@
 <?xml version='1.0'?>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                 xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
-                xmlns:db="http://docbook.org/ns/docbook"
                 xmlns:dyn="http://exslt.org/dynamic"
                 xmlns:saxon="http://icl.com/saxon"
-                exclude-result-prefixes="db doc dyn saxon"
+                exclude-result-prefixes="doc dyn saxon"
                 version='1.0'>
 
 <!-- ********************************************************************
@@ -95,10 +94,7 @@ ooexception
 oointerface
 simplemsgentry
 manvolnum
-
-db:refentry
 "/>
-
 <!-- ====================================================================== -->
 
 <doc:template name="is.component" xmlns="">
index 416c875e33645a7d5532f78c053e6ec1a6e25b27..70d71f0334f060f76e41ba81d7184e0d56c0e9f8 100644 (file)
@@ -17,7 +17,7 @@
 
 <!-- ==================================================================== -->
 
-<xsl:param name="refentry.emit.messages" select="1"/>
+<xsl:param name="refentry.meta.get.quietly" select="0"/>
 
 <doc:reference xmlns="">
   <referenceinfo>
@@ -90,8 +90,6 @@
       data as a set.</para>
     </note>
 
-    <para>The manpages stylesheets are an application of the “APIs” in
-    this stylesheet.</para>
   </refdescription>
 
   <refparameter>
     </xsl:call-template>
   </title>
   <section>
-    <xsl:call-template name="get.refentry.section"/>
+    <xsl:call-template name="get.refentry.section">
+      <xsl:with-param name="refname" select="$refname"/>
+    </xsl:call-template>
   </section>
   <date>
     <xsl:call-template name="get.refentry.date">
       <xsl:with-param name="info" select="$info"/>
+      <xsl:with-param name="refname" select="$refname"/>
       <xsl:with-param name="prefs" select="$prefs/DatePrefs"/>
     </xsl:call-template>
   </date>
   <source>
     <xsl:call-template name="get.refentry.source">
       <xsl:with-param name="info" select="$info"/>
+      <xsl:with-param name="refname" select="$refname"/>
       <xsl:with-param name="prefs" select="$prefs/SourcePrefs"/>
     </xsl:call-template>
   </source>
   <manual>
     <xsl:call-template name="get.refentry.manual">
       <xsl:with-param name="info" select="$info"/>
+      <xsl:with-param name="refname" select="$refname"/>
       <xsl:with-param name="prefs" select="$prefs/ManualPrefs"/>
     </xsl:call-template>
   </manual>
-  <xsl:call-template name="refentry.emit.message">
-    <xsl:with-param name="level">Note</xsl:with-param>
-    <xsl:with-param
-        name="message"
-        >To suppress "meta" messages, set $refentry.emit.messages to 0.</xsl:with-param>
-  </xsl:call-template>
 </xsl:template>
 
 <!-- ====================================================================== -->
 
   <refparameter>
     <variablelist>
+      <varlistentry>
+        <term>refname</term>
+        <listitem>
+          <para>The first <tag>refname</tag> in the refentry</para>
+        </listitem>
+      </varlistentry>
       <varlistentry>
         <term>quiet</term>
         <listitem>
       <xsl:if test="$quiet = 0">
         <xsl:call-template name="refentry.emit.message">
           <xsl:with-param name="level">Note</xsl:with-param>
+          <xsl:with-param name="refname" select="$refname"/>
           <xsl:with-param
               name="message"
-              >meta manvolnum: No manvolnum.</xsl:with-param>
+              >meta manvol : No manvolnum</xsl:with-param>
         </xsl:call-template>
       </xsl:if>
       <xsl:choose>
           <xsl:if test="$quiet = 0">
             <xsl:call-template name="refentry.emit.message">
               <xsl:with-param name="level">Note</xsl:with-param>
+              <xsl:with-param name="refname" select="$refname"/>
               <xsl:with-param
                   name="message"
-                  >meta manvolnum: Found funcsynopsis. Setting man section to 3.</xsl:with-param>
+                  >meta manvol : Setting man section to 3</xsl:with-param>
             </xsl:call-template>
             <xsl:text>3</xsl:text>
           </xsl:if>
 
   <refparameter>
     <variablelist>
+      <varlistentry>
+        <term>refname</term>
+        <listitem>
+          <para>The first <tag>refname</tag> in the refentry</para>
+        </listitem>
+      </varlistentry>
       <varlistentry>
         <term>info</term>
         <listitem>
         <!-- * in *info -->
         <xsl:choose>
           <!-- * look for date or pubdate in *info -->
-          <xsl:when test="$info//date
-                          |$info//pubdate">
-            <xsl:copy>
-              <xsl:call-template name="set.refentry.metadata">
-                <xsl:with-param 
-                    name="info"
-                    select="($info[//date])[last()]"/>
-                <xsl:with-param 
-                    name="contents"
-                    select="(($info[//date])[last()]/date)[1]|
-                            (($info[//pubdate])[last()]/pubdate)[1]"/>
-                <xsl:with-param name="context">date</xsl:with-param>
-              </xsl:call-template>
-            </xsl:copy>
+          <xsl:when test="$info/date
+                          |$info/pubdate">
+            <xsl:value-of
+                select="(($info[date])[last()]/date)[1]|
+                        (($info[pubdate])[last()]/pubdate)[1]"/>
           </xsl:when>
           <xsl:otherwise>
             <!-- * found no Date or Pubdate -->
     <xsl:otherwise>
       <xsl:call-template name="refentry.emit.message">
         <xsl:with-param name="level">Note</xsl:with-param>
+        <xsl:with-param name="refname" select="$refname"/>
         <xsl:with-param
             name="message"
-            >meta "date"   : No date found. Generating localized date.</xsl:with-param>
+            >meta date   : No date. Using generated date</xsl:with-param>
       </xsl:call-template>
       <xsl:call-template name="datetime.format">
         <xsl:with-param name="date">
 
   <refparameter>
     <variablelist>
+      <varlistentry>
+        <term>refname</term>
+        <listitem>
+          <para>The first <tag>refname</tag> in the refentry</para>
+        </listitem>
+      </varlistentry>
       <varlistentry>
         <term>info</term>
         <listitem>
     <xsl:if test="$prefs/Name/@suppress = 0">
       <xsl:call-template name="get.refentry.source.name">
         <xsl:with-param name="info" select="$info"/>
+        <xsl:with-param name="refname" select="$refname"/>
         <xsl:with-param name="prefs" select="$prefs/Name"/>
       </xsl:call-template>
     </xsl:if>
     <xsl:if test="$prefs/Version/@suppress = 0">
       <xsl:call-template name="get.refentry.version">
         <xsl:with-param name="info" select="$info"/>
+        <xsl:with-param name="refname" select="$refname"/>
         <xsl:with-param name="prefs" select="$prefs/Version"/>
       </xsl:call-template>
     </xsl:if>
         <xsl:otherwise>
           <xsl:call-template name="refentry.emit.message">
             <xsl:with-param name="level">Warn</xsl:with-param>
+            <xsl:with-param name="refname" select="$refname"/>
             <xsl:with-param
                 name="message"
-                >meta "source" : No valid fallback found. Leaving empty.</xsl:with-param>
+                >meta source : No valid fallback. Leaving empty</xsl:with-param>
           </xsl:call-template>
         </xsl:otherwise>
       </xsl:choose>
     <xsl:otherwise>
       <xsl:call-template name="refentry.emit.message">
         <xsl:with-param name="level">Warn</xsl:with-param>
+        <xsl:with-param name="refname" select="$refname"/>
         <xsl:with-param
             name="message"
-            >meta "source" : No fallback specified; leaving empty.</xsl:with-param>
+            >meta source : No fallback specified; leaving empty.</xsl:with-param>
       </xsl:call-template>
     </xsl:otherwise>
   </xsl:choose>
 
   <refparameter>
     <variablelist>
+      <varlistentry>
+        <term>refname</term>
+        <listitem>
+          <para>The first <tag>refname</tag> in the refentry</para>
+        </listitem>
+      </varlistentry>
       <varlistentry>
         <term>info</term>
         <listitem>
               select="refmeta/refmiscinfo[@class = 'source' or @class='software'][1]/node()"/>
         </xsl:when>
         <xsl:otherwise>
-          <xsl:call-template name="refentry.emit.message">
-            <xsl:with-param name="level">Note</xsl:with-param>
-            <xsl:with-param
-                name="message"
-                >meta "source" : No refmiscinfo@class="source"|"software"</xsl:with-param>
-          </xsl:call-template>
           <xsl:choose>
-            <xsl:when test="$info//productname">
+            <xsl:when test="$info/productname">
               <xsl:call-template name="set.refentry.metadata">
+                <xsl:with-param name="refname" select="$refname"/>
                 <xsl:with-param
                     name="info"
-                    select="($info[//productname])[last()]"/>
+                    select="($info[productname])[last()]"/>
                 <xsl:with-param
                     name="contents"
-                    select="(($info[//productname])[last()]/productname)[1]"/>
+                    select="(($info[productname])[last()]/productname)[1]"/>
                 <xsl:with-param name="context">source</xsl:with-param>
               </xsl:call-template>
             </xsl:when>
-            <xsl:when test="$info//corpname">
+            <xsl:when test="$info/corpname">
               <xsl:call-template name="set.refentry.metadata">
+                <xsl:with-param name="refname" select="$refname"/>
                 <xsl:with-param
                     name="info"
-                    select="($info[//corpname])[last()]"/>
+                    select="($info[corpname])[last()]"/>
                 <xsl:with-param
                     name="contents"
-                    select="(($info[//corpname])[last()]/corpname)[1]"/>
+                    select="(($info[corpname])[last()]/corpname)[1]"/>
                 <xsl:with-param name="context">source</xsl:with-param>
+                <xsl:with-param name="preferred">productname</xsl:with-param>
               </xsl:call-template>
             </xsl:when>
-            <xsl:when test="$info//corpcredit">
+            <xsl:when test="$info/corpcredit">
               <xsl:call-template name="set.refentry.metadata">
+                <xsl:with-param name="refname" select="$refname"/>
                 <xsl:with-param
                     name="info"
-                    select="($info[//corpcredit])[last()]"/>
+                    select="($info[corpcredit])[last()]"/>
                 <xsl:with-param
                     name="contents"
-                    select="(($info[//corpcredit])[last()]/corpcredit)[1]"/>
+                    select="(($info[corpcredit])[last()]/corpcredit)[1]"/>
                 <xsl:with-param name="context">source</xsl:with-param>
+                <xsl:with-param name="preferred">productname</xsl:with-param>
               </xsl:call-template>
             </xsl:when>
-            <xsl:when test="$info//corpauthor">
+            <xsl:when test="$info/corpauthor">
               <xsl:call-template name="set.refentry.metadata">
+                <xsl:with-param name="refname" select="$refname"/>
                 <xsl:with-param
                     name="info"
-                    select="($info[//corpauthor])[last()]"/>
+                    select="($info[corpauthor])[last()]"/>
                 <xsl:with-param
                     name="contents"
-                    select="(($info[//corpauthor])[last()]/corpauthor)[1]"/>
+                    select="(($info[corpauthor])[last()]/corpauthor)[1]"/>
                 <xsl:with-param name="context">source</xsl:with-param>
+                <xsl:with-param name="preferred">productname</xsl:with-param>
               </xsl:call-template>
             </xsl:when>
             <xsl:when test="$info//orgname">
               <xsl:call-template name="set.refentry.metadata">
+                <xsl:with-param name="refname" select="$refname"/>
                 <xsl:with-param
                     name="info"
                     select="($info[//orgname])[last()]"/>
                     name="contents"
                     select="(($info[//orgname])[last()]//orgname)[1]"/>
                 <xsl:with-param name="context">source</xsl:with-param>
+                <xsl:with-param name="preferred">productname</xsl:with-param>
               </xsl:call-template>
             </xsl:when>
             <xsl:when test="$info//publishername">
               <xsl:call-template name="set.refentry.metadata">
+                <xsl:with-param name="refname" select="$refname"/>
                 <xsl:with-param
                     name="info"
                     select="($info[//publishername])[last()]"/>
                     name="contents"
                     select="(($info[//publishername])[last()]//publishername)[1]"/>
                 <xsl:with-param name="context">source</xsl:with-param>
+                <xsl:with-param name="preferred">productname</xsl:with-param>
               </xsl:call-template>
             </xsl:when>
             <xsl:otherwise>
               <xsl:call-template name="refentry.emit.message">
                 <xsl:with-param name="level">Note</xsl:with-param>
+                <xsl:with-param name="refname" select="$refname"/>
+                <xsl:with-param
+                    name="message"
+                    >meta source : No productname or alternative</xsl:with-param>
+              </xsl:call-template>
+              <xsl:call-template name="refentry.emit.message">
+                <xsl:with-param name="level">Note</xsl:with-param>
+                <xsl:with-param name="refname" select="$refname"/>
                 <xsl:with-param
                     name="message"
-                    >meta "source" : No valid alternatives to refmiscinfo.</xsl:with-param>
+                    >meta source : No refmiscinfo@class=source</xsl:with-param>
               </xsl:call-template>
             </xsl:otherwise>
           </xsl:choose>
 
   <refparameter>
     <variablelist>
+      <varlistentry>
+        <term>refname</term>
+        <listitem>
+          <para>The first <tag>refname</tag> in the refentry</para>
+        </listitem>
+      </varlistentry>
       <varlistentry>
         <term>info</term>
         <listitem>
               select="refmeta/refmiscinfo[@class = 'version'][1]/node()"/>
         </xsl:when>
         <xsl:otherwise>
-          <xsl:call-template name="refentry.emit.message">
-            <xsl:with-param name="level">Note</xsl:with-param>
-            <xsl:with-param
-                name="message"
-                >meta "version": No refmiscinfo@class="version"</xsl:with-param>
-          </xsl:call-template>
           <xsl:choose>
-            <xsl:when test="$info//productnumber">
+            <xsl:when test="$info/productnumber">
               <xsl:call-template name="set.refentry.metadata">
+                <xsl:with-param name="refname" select="$refname"/>
                 <xsl:with-param
                     name="info"
-                    select="($info[//productnumber])[last()]"/>
+                    select="($info[productnumber])[last()]"/>
                 <xsl:with-param
                     name="contents"
-                    select="(($info[//productnumber])[last()]/productnumber)[1]"/>
+                    select="(($info[productnumber])[last()]/productnumber)[1]"/>
                 <xsl:with-param name="context">version</xsl:with-param>
               </xsl:call-template>
             </xsl:when>
-            <xsl:when test="$info//edition">
+            <xsl:when test="$info/edition">
               <xsl:call-template name="set.refentry.metadata">
+                <xsl:with-param name="refname" select="$refname"/>
                 <xsl:with-param
                     name="info"
-                    select="($info[//edition])[last()]"/>
+                    select="($info[edition])[last()]"/>
                 <xsl:with-param
                     name="contents"
-                    select="(($info[//edition])[last()]/edition)[1]"/>
+                    select="(($info[edition])[last()]/edition)[1]"/>
                 <xsl:with-param name="context">version</xsl:with-param>
+                <xsl:with-param name="preferred">productnumber</xsl:with-param>
               </xsl:call-template>
             </xsl:when>
-            <xsl:when test="$info//releaseinfo">
+            <xsl:when test="$info/releaseinfo">
               <xsl:call-template name="set.refentry.metadata">
+                <xsl:with-param name="refname" select="$refname"/>
                 <xsl:with-param
                     name="info"
-                    select="($info[//releaseinfo])[last()]"/>
+                    select="($info[releaseinfo])[last()]"/>
                 <xsl:with-param
                     name="contents"
-                    select="(($info[//releaseinfo])[last()]/releaseinfo)[1]"/>
+                    select="(($info[releaseinfo])[last()]/releaseinfo)[1]"/>
                 <xsl:with-param name="context">version</xsl:with-param>
+                <xsl:with-param name="preferred">productnumber</xsl:with-param>
               </xsl:call-template>
             </xsl:when>
             <xsl:otherwise>
               <xsl:call-template name="refentry.emit.message">
                 <xsl:with-param name="level">Note</xsl:with-param>
+                <xsl:with-param name="refname" select="$refname"/>
                 <xsl:with-param
                     name="message"
-                    >meta "version": No valid alternatives to refmiscinfo.</xsl:with-param>
+                    >meta version: No productnumber or alternative</xsl:with-param>
+              </xsl:call-template>
+              <xsl:call-template name="refentry.emit.message">
+                <xsl:with-param name="level">Note</xsl:with-param>
+                <xsl:with-param name="refname" select="$refname"/>
+                <xsl:with-param
+                    name="message"
+                    >meta version: No refmiscinfo@class=version</xsl:with-param>
               </xsl:call-template>
             </xsl:otherwise>
           </xsl:choose>
 
   <refparameter>
     <variablelist>
+      <varlistentry>
+        <term>refname</term>
+        <listitem>
+          <para>The first <tag>refname</tag> in the refentry</para>
+        </listitem>
+      </varlistentry>
       <varlistentry>
         <term>info</term>
         <listitem>
                 select="refmeta/refmiscinfo[@class = 'manual' or @class = 'sectdesc'][1]/node()"/>
           </xsl:when>
           <xsl:otherwise>
-            <xsl:call-template name="refentry.emit.message">
-              <xsl:with-param name="level">Note</xsl:with-param>
-              <xsl:with-param
-                  name="message"
-                  >meta "manual" : No refmiscinfo@class="manual"|"sectdesc"</xsl:with-param>
-            </xsl:call-template>
+            <!-- * only in the case of choosing appropriate -->
+            <!-- * "manual" content do we select the furthest -->
+            <!-- * (first) matching element instead of the -->
+            <!-- * closest (last) matching one -->
             <xsl:choose>
-              <xsl:when test="$info//title">
+              <xsl:when test="ancestor::*/title">
                 <xsl:call-template name="set.refentry.metadata">
+                  <xsl:with-param name="refname" select="$refname"/>
                   <xsl:with-param
                       name="info"
-                      select="($info[//title])[last()]"/>
+                      select="(ancestor::*[title])[1]"/>
                   <xsl:with-param
                       name="contents"
-                      select="(($info[//title])[last()]/title)[1]"/>
+                      select="(ancestor::*[title])[1]/title"/>
                   <xsl:with-param name="context">manual</xsl:with-param>
                 </xsl:call-template>
               </xsl:when>
-              <xsl:when test="../title">
+              <xsl:when test="$info/title">
                 <xsl:call-template name="set.refentry.metadata">
+                  <xsl:with-param name="refname" select="$refname"/>
                   <xsl:with-param
                       name="info"
-                      select="'..'"/>
+                      select="($info[title])[1]"/>
                   <xsl:with-param
                       name="contents"
-                      select="../title"/>
+                      select="(($info[title])[1]/title)[1]"/>
                   <xsl:with-param name="context">manual</xsl:with-param>
                 </xsl:call-template>
               </xsl:when>
               <xsl:otherwise>
                 <xsl:call-template name="refentry.emit.message">
                   <xsl:with-param name="level">Note</xsl:with-param>
+                  <xsl:with-param name="refname" select="$refname"/>
                   <xsl:with-param
                       name="message"
-                      >meta "manual" : No valid alternatives to refmiscinfo.</xsl:with-param>
+                      >meta manual : No ancestor with title</xsl:with-param>
+                </xsl:call-template>
+                <xsl:call-template name="refentry.emit.message">
+                  <xsl:with-param name="level">Note</xsl:with-param>
+                  <xsl:with-param name="refname" select="$refname"/>
+                  <xsl:with-param
+                      name="message"
+                      >meta manual : No refmiscinfo@class=manual</xsl:with-param>
                 </xsl:call-template>
               </xsl:otherwise>
             </xsl:choose>
     <xsl:when test="not($Manual = '')">
       <xsl:copy-of select="$Manual"/>
     </xsl:when>
-    <!-- * if no Manual, use contents of specified -->
-    <!-- * Fallback (if any) -->
+    <!-- * if no Manual, use contents of specified Fallback (if any) -->
     <xsl:when test="not($prefs/@fallback = '')">
       <xsl:variable name="manual.fallback">
         <xsl:call-template name="evaluate.info.profile">
         <xsl:otherwise>
           <xsl:call-template name="refentry.emit.message">
             <xsl:with-param name="level">Warn</xsl:with-param>
+            <xsl:with-param name="refname" select="$refname"/>
             <xsl:with-param
                 name="message"
-                >meta "manual" : No valid fallback found. Leaving empty.</xsl:with-param>
+                >meta manual : No valid fallback. Leaving empty</xsl:with-param>
           </xsl:call-template>
         </xsl:otherwise>
       </xsl:choose>
     <xsl:otherwise>
       <xsl:call-template name="refentry.emit.message">
         <xsl:with-param name="level">Warn</xsl:with-param>
+        <xsl:with-param name="refname" select="$refname"/>
         <xsl:with-param
             name="message"
-            >meta "manual" : No fallback specified; leaving empty.</xsl:with-param>
+            >meta manual : No fallback specified; leaving empty.</xsl:with-param>
       </xsl:call-template>
     </xsl:otherwise>
   </xsl:choose>
   <refdescription>
     <para>The <function>set.refentry.metadata</function> function is
     called each time a suitable source element is found for a certain
-    metadata field. It emits a message indicating what source element
-    it has found.</para>
+    metadata field.</para>
   </refdescription>
 
   <refparameter>
     <variablelist>
+      <varlistentry>
+        <term>refname</term>
+        <listitem>
+          <para>The first <tag>refname</tag> in the refentry</para>
+        </listitem>
+      </varlistentry>
       <varlistentry>
         <term>info</term>
         <listitem>
 </doc:template>
 
 <xsl:template name="set.refentry.metadata">
+  <xsl:param name="refname"/>
   <xsl:param name="info"/>
   <xsl:param name="contents"/>
   <xsl:param name="context"/>
-  <xsl:call-template name="refentry.emit.message">
-    <xsl:with-param name="level">Note</xsl:with-param>
-    <xsl:with-param
-        name="message"
-        >meta "<xsl:value-of
-        select="$context"/>"<xsl:call-template
-        name="copy-string">
-    <xsl:with-param name="string" select="'&#x20;'"/>
-    <xsl:with-param
-        name="count"
-        select="7 - string-length($context)"/>
-    </xsl:call-template>: Using <xsl:value-of
-    select="local-name($info)"/>/<xsl:value-of
-    select="local-name($contents)"/></xsl:with-param>
-  </xsl:call-template>
+  <xsl:param name="preferred"/>
+  <xsl:if test="not($preferred = '')">
+    <xsl:call-template name="refentry.emit.message">
+      <xsl:with-param name="level">Note</xsl:with-param>
+      <xsl:with-param name="refname" select="$refname"/>
+      <xsl:with-param
+          name="message"
+          >meta <xsl:value-of
+          select="$context"/><xsl:call-template
+          name="copy-string">
+      <xsl:with-param name="string" select="'&#x20;'"/>
+      <xsl:with-param
+          name="count"
+          select="7 - string-length($context)"/>
+      </xsl:call-template>: No <xsl:value-of select="$preferred"
+      /></xsl:with-param>
+    </xsl:call-template>
+    <xsl:call-template name="refentry.emit.message">
+      <xsl:with-param name="level">Note</xsl:with-param>
+      <xsl:with-param name="refname" select="$refname"/>
+      <xsl:with-param
+          name="message"
+          >meta <xsl:value-of
+          select="$context"/><xsl:call-template
+          name="copy-string">
+      <xsl:with-param name="string" select="'&#x20;'"/>
+      <xsl:with-param
+          name="count"
+          select="7 - string-length($context)"/>
+      </xsl:call-template>: No refmiscinfo@class=<xsl:value-of
+      select="$context"/></xsl:with-param>
+    </xsl:call-template>
+    <xsl:call-template name="refentry.emit.message">
+      <xsl:with-param name="level">Note</xsl:with-param>
+      <xsl:with-param name="refname" select="$refname"/>
+      <xsl:with-param
+          name="message"
+          >meta <xsl:value-of
+          select="$context"/><xsl:call-template
+          name="copy-string">
+      <xsl:with-param name="string" select="'&#x20;'"/>
+      <xsl:with-param
+          name="count"
+          select="7 - string-length($context)"/>
+      </xsl:call-template>: Using <xsl:value-of
+      select="local-name($contents)"/></xsl:with-param>
+    </xsl:call-template>
+  </xsl:if>
   <xsl:value-of select="$contents"/>
 </xsl:template>
 
           <literal>Warning</literal>)</para>
         </listitem>
       </varlistentry>
+      <varlistentry>
+        <term>refname</term>
+        <listitem>
+          <para>The first <tag>refname</tag> in the refentry</para>
+        </listitem>
+      </varlistentry>
       <varlistentry>
         <term>message</term>
         <listitem>
 
 <xsl:template name="refentry.emit.message">
   <xsl:param name="level"/>
+  <xsl:param name="refname"/>
   <xsl:param name="message"/>
-  <xsl:if test="not($refentry.emit.messages = 0)">
+  <xsl:if test="$refentry.meta.get.quietly = 0">
     <xsl:message><xsl:value-of
     select="$level"/><xsl:text>: </xsl:text><xsl:value-of
-    select="$message"/></xsl:message>
+    select="$message"/><xsl:call-template
+        name="copy-string">
+    <xsl:with-param name="string" select="'&#x20;'"/>
+    <xsl:with-param
+        name="count"
+        select="50 - string-length($message)"/>
+    </xsl:call-template><xsl:value-of
+    select="$refname"/></xsl:message>
   </xsl:if>
 </xsl:template>
 
index 7a6318a81ae5702fd0d2ad84c7aa696017826f91..755e8f01d62a051c41acc18f02f697e58e37afe1 100644 (file)
@@ -3,17 +3,15 @@
                 xmlns:exsl="http://exslt.org/common"
                 xmlns:ng="http://docbook.org/docbook-ng"
                 xmlns:db="http://docbook.org/ns/docbook"
-                exclude-result-prefixes="db ng exsl"
+                exclude-result-prefixes="exsl"
                 version='1.0'>
 
   <xsl:import href="../html/docbook.xsl"/>
   <xsl:import href="../html/manifest.xsl"/>
   <xsl:import href="html-synop.xsl"/> <!-- generated by build -->
-
   <xsl:output method="text"
               encoding="UTF-8"
               indent="no"/>
-
   <!-- ********************************************************************
        $Id$
        ********************************************************************
                 </xsl:with-param>
               </xsl:call-template>
             </xsl:if>
-            <xsl:if test="$man.output.quietly = 0">
-              <xsl:message
-              >Note: To suppress "Writing..." messages, set $man.output.quietly to 1.</xsl:message>
-            </xsl:if>
           </xsl:when>
           <xsl:otherwise>
             <!-- * Otherwise, the document does not contain any -->
index a8798876e86f13949f19662a77e97c5d89f28b9b..927993bf192896cf32d0dd95c1c3266a6c090a59 100644 (file)
@@ -1,6 +1,7 @@
 <?xml version='1.0'?>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                 xmlns:exsl="http://exslt.org/common"
+                xmlns:db="http://docbook.org/ns/docbook"
                 exclude-result-prefixes="exsl"
                 version='1.0'>
 
 <!-- * each Refentry; they are just in a separate file for the purpose -->
 <!-- * of keeping things modular. -->
 
+<!-- ==================================================================== -->
+
+<xsl:preserve-space elements="*"/>
+
+<xsl:strip-space elements="
+abstract affiliation anchor answer appendix area areaset areaspec
+artheader article audiodata audioobject author authorblurb authorgroup
+beginpage bibliodiv biblioentry bibliography biblioset blockquote book
+bookbiblio bookinfo callout calloutlist caption caution chapter
+citerefentry cmdsynopsis co collab colophon colspec confgroup
+copyright dedication docinfo editor entrytbl epigraph equation
+example figure footnote footnoteref formalpara funcprototype
+funcsynopsis glossary glossdef glossdiv glossentry glosslist graphicco
+group highlights imagedata imageobject imageobjectco important index
+indexdiv indexentry indexterm informalequation informalexample
+informalfigure informaltable inlineequation inlinemediaobject
+itemizedlist itermset keycombo keywordset legalnotice listitem lot
+mediaobject mediaobjectco menuchoice msg msgentry msgexplan msginfo
+msgmain msgrel msgset msgsub msgtext note objectinfo
+orderedlist othercredit part partintro preface printhistory procedure
+programlistingco publisher qandadiv qandaentry qandaset question
+refentry reference refmeta refnamediv refsection refsect1 refsect1info refsect2
+refsect2info refsect3 refsect3info refsynopsisdiv refsynopsisdivinfo
+revhistory revision row sbr screenco screenshot sect1 sect1info sect2
+sect2info sect3 sect3info sect4 sect4info sect5 sect5info section
+sectioninfo seglistitem segmentedlist seriesinfo set setindex setinfo
+shortcut sidebar simplelist simplesect spanspec step subject
+subjectset substeps synopfragment table tbody textobject tfoot tgroup
+thead tip toc tocchap toclevel1 toclevel2 toclevel3 toclevel4
+toclevel5 tocpart varargs variablelist varlistentry videodata
+videoobject void warning subjectset
+
+classsynopsis
+constructorsynopsis
+destructorsynopsis
+fieldsynopsis
+methodparam
+methodsynopsis
+ooclass
+ooexception
+oointerface
+simplemsgentry
+manvolnum
+
+db:abstract db:affiliation db:anchor db:answer db:appendix db:area db:areaset db:areaspec
+db:artheader db:article db:audiodata db:audioobject db:author db:authorblurb db:authorgroup
+db:beginpage db:bibliodiv db:biblioentry db:bibliography db:biblioset db:blockquote db:book
+db:bookbiblio db:bookinfo db:callout db:calloutlist db:caption db:caution db:chapter
+db:citerefentry db:cmdsynopsis db:co db:collab db:colophon db:colspec db:confgroup
+db:copyright db:dedication db:docinfo db:editor db:entrytbl db:epigraph db:equation
+db:example db:figure db:footnote db:footnoteref db:formalpara db:funcprototype
+db:funcsynopsis db:glossary db:glossdef db:glossdiv db:glossentry db:glosslist db:graphicco
+db:group db:highlights db:imagedata db:imageobject db:imageobjectco db:important db:index
+db:indexdiv db:indexentry db:indexterm db:informalequation db:informalexample
+db:informalfigure db:informaltable db:inlineequation db:inlinemediaobject
+db:itemizedlist db:itermset db:keycombo db:keywordset db:legalnotice db:listitem db:lot
+db:mediaobject db:mediaobjectco db:menuchoice db:msg db:msgentry db:msgexplan db:msginfo
+db:msgmain db:msgrel db:msgset db:msgsub db:msgtext db:note db:objectinfo
+db:orderedlist db:othercredit db:part db:partintro db:preface db:printhistory db:procedure
+db:programlistingco db:publisher db:qandadiv db:qandaentry db:qandaset db:question
+db:refentry db:reference db:refmeta db:refnamediv db:refsection db:refsect1 db:refsect1info
+db:refsect2
+db:refsect2info db:refsect3 db:refsect3info db:refsynopsisdiv db:refsynopsisdivinfo
+db:revhistory db:revision db:row db:sbr db:screenco db:screenshot db:sect1 db:sect1info db:sect2
+db:sect2info db:sect3 db:sect3info db:sect4 db:sect4info db:sect5 db:sect5info db:section
+db:sectioninfo db:seglistitem db:segmentedlist db:seriesinfo db:set db:setindex db:setinfo
+db:shortcut db:sidebar db:simplelist db:simplesect db:spanspec db:step db:subject
+db:subjectset db:substeps db:synopfragment db:table db:tbody db:textobject db:tfoot db:tgroup
+db:thead db:tip db:toc db:tocchap db:toclevel1 db:toclevel2 db:toclevel3 db:toclevel4
+db:toclevel5 db:tocpart db:varargs db:variablelist db:varlistentry db:videodata
+db:videoobject db:void db:warning db:subjectset
+
+db:classsynopsis
+db:constructorsynopsis
+db:destructorsynopsis
+db:fieldsynopsis
+db:methodparam
+db:methodsynopsis
+db:ooclass
+db:ooexception
+db:oointerface
+db:simplemsgentry
+db:manvolnum
+"/>
+
 <!-- ==================================================================== -->
 <!-- * Get character map contents -->
 <!-- ==================================================================== -->
     </xsl:param>
     <xsl:call-template name="write.text.chunk">
       <xsl:with-param name="filename" select="$filename"/>
+      <xsl:with-param name="suppress-context-node-name" select="1"/>
       <xsl:with-param name="quiet" select="$man.output.quietly"/>
-      <xsl:with-param name="message-prolog">Note: </xsl:with-param>
+      <xsl:with-param
+          name="message-prolog"
+          >Note: </xsl:with-param>
       <xsl:with-param name="encoding" select="$man.output.encoding"/>
       <xsl:with-param name="content" select="$content"/>
     </xsl:call-template>
       <xsl:with-param name="filename">
         <xsl:value-of select="$man.manifest.filename"/>
       </xsl:with-param>
-      <xsl:with-param name="quiet" select="$man.output.quietly"/>
+      <xsl:with-param name="quiet" select="1"/>
       <xsl:with-param name="message-prolog">Note: </xsl:with-param>
       <xsl:with-param name="message-epilog"> (manifest file)</xsl:with-param>
       <xsl:with-param name="content">
         <xsl:value-of select="$filelist"/>
       </xsl:with-param>
     </xsl:call-template>
+    <xsl:message><xsl:text>&#10;</xsl:text></xsl:message>
   </xsl:template>
 
 </xsl:stylesheet>