<xsl:param name="refname"/>
<xsl:param name="info"/>
<xsl:param name="prefs"/>
- <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>
<title>
<xsl:call-template name="get.refentry.title">
<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>
<!-- ====================================================================== -->
commands"].</para>
</refdescription>
- <refparameter><para>[none]</para></refparameter>
+ <refparameter>
+ <variablelist>
+ <varlistentry>
+ <term>quiet</term>
+ <listitem>
+ <para>If non-zero, no "missing" message is emitted</para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </refparameter>
<refreturn>
- <para>Returns a <tag>section</tag> node.</para></refreturn>
+ <para>Returns a string representing a section number.</para></refreturn>
</doc:template>
<xsl:template name="get.refentry.section">
+ <xsl:param name="quiet" select="0"/>
<xsl:choose>
<xsl:when test="refmeta/manvolnum">
<xsl:value-of select="refmeta/manvolnum"/>
</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 manvolnum: No manvolnum.</xsl:with-param>
- </xsl:call-template>
+ <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="message"
+ >meta manvolnum: No manvolnum.</xsl:with-param>
+ </xsl:call-template>
+ </xsl:if>
<xsl:choose>
<xsl:when test=".//funcsynopsis">
- <xsl:call-template name="refentry.emit.message">
- <xsl:with-param name="level">Note</xsl:with-param>
- <xsl:with-param
- name="message"
- >meta manvolnum: Found funcsynopsis. Setting section number to 3.</xsl:with-param>
- </xsl:call-template>
- <xsl:text>3</xsl:text>
+ <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="message"
+ >meta manvolnum: Found funcsynopsis. Setting man section to 3.</xsl:with-param>
+ </xsl:call-template>
+ <xsl:text>3</xsl:text>
+ </xsl:if>
</xsl:when>
<xsl:otherwise>
<xsl:text>1</xsl:text>
<xsl:template name="write.chunk">
<xsl:param name="filename" select="''"/>
<xsl:param name="quiet" select="$chunker.output.quiet"/>
+ <xsl:param name="suppress-context-node-name" select="0"/>
+ <xsl:param name="message-prolog"/>
+ <xsl:param name="message-epilog"/>
<xsl:param name="method" select="$chunker.output.method"/>
<xsl:param name="encoding" select="$chunker.output.encoding"/>
<xsl:if test="$quiet = 0">
<xsl:message>
+ <xsl:if test="not($message-prolog = '')">
+ <xsl:value-of select="$message-prolog"/>
+ </xsl:if>
<xsl:text>Writing </xsl:text>
<xsl:value-of select="$filename"/>
- <xsl:if test="name(.) != ''">
+ <xsl:if test="name(.) != '' and $suppress-context-node-name = 0">
<xsl:text> for </xsl:text>
<xsl:value-of select="name(.)"/>
<xsl:if test="@id">
<xsl:text>)</xsl:text>
</xsl:if>
</xsl:if>
+ <xsl:if test="not($message-epilog = '')">
+ <xsl:value-of select="$message-epilog"/>
+ </xsl:if>
</xsl:message>
</xsl:if>
<xsl:template name="write.text.chunk">
<xsl:param name="filename" select="''"/>
<xsl:param name="quiet" select="$chunker.output.quiet"/>
+ <xsl:param name="suppress-context-node-name" select="0"/>
+ <xsl:param name="message-prolog"/>
+ <xsl:param name="message-epilog"/>
<xsl:param name="method" select="'text'"/>
<xsl:param name="encoding" select="$chunker.output.encoding"/>
<xsl:param name="media-type" select="$chunker.output.media-type"/>
<xsl:call-template name="write.chunk">
<xsl:with-param name="filename" select="$filename"/>
<xsl:with-param name="quiet" select="$quiet"/>
+ <xsl:with-param name="suppress-context-node-name" select="$suppress-context-node-name"/>
+ <xsl:with-param name="message-prolog" select="$message-prolog"/>
+ <xsl:with-param name="message-epilog" select="$message-epilog"/>
<xsl:with-param name="method" select="$method"/>
<xsl:with-param name="encoding" select="$encoding"/>
<xsl:with-param name="indent" select="'no'"/>
<!-- * document; if so, process them. -->
<xsl:apply-templates select="//refentry"/>
<!-- * if $generate.manifest is non-zero, generate a manifest file -->
- <xsl:if test="not($generate.manifest = '0')">
+ <xsl:if test="not($generate.manifest = 0)">
<xsl:call-template name="generate.manifest">
<xsl:with-param name="filename">
<xsl:choose>
</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 -->
<xsl:call-template name="write.text.chunk">
<xsl:with-param name="filename" select="$filename"/>
<xsl:with-param name="quiet" select="$man.output.quietly"/>
+ <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:call-template>
</xsl:with-param>
<xsl:with-param name="quiet" select="$man.output.quietly"/>
+ <xsl:with-param name="suppress-context-node-name" select="1"/>
+ <xsl:with-param name="message-prolog">Note: </xsl:with-param>
+ <xsl:with-param name="message-epilog"> (soelim stub)</xsl:with-param>
<xsl:with-param name="content">
<xsl:value-of select="concat('.so man', $section, '/')"/>
<xsl:call-template name="make.adjusted.man.filename">
<!-- ============================================================== -->
- <!-- * A manifest file is useful for doing “make clean” during -->
+ <!-- * A manifest file is useful for doing "make clean" during -->
<!-- * builds and for other purposes. When we make the manifest -->
<!-- * file, we need to include in it a filename for each man-page -->
- <!-- * generated, including any “stub” pages. -->
+ <!-- * generated, including any "stub" pages. -->
<xsl:template name="generate.manifest">
<xsl:param name="filename">MAN.MANIFEST</xsl:param>
<xsl:variable name="filelist">
<!-- * numbers from the parent Refentry; so we only need to get -->
<!-- * the section once per Refentry, not once per Refname -->
<xsl:variable name="section">
- <xsl:call-template name="get.refentry.section"/>
+ <xsl:call-template name="get.refentry.section">
+ <xsl:with-param name="quiet" select="1"/>
+ </xsl:call-template>
</xsl:variable>
<xsl:for-each select="refnamediv/refname">
<xsl:call-template name="make.adjusted.man.filename">
<xsl:value-of select="$man.manifest.filename"/>
</xsl:with-param>
<xsl:with-param name="quiet" select="$man.output.quietly"/>
+ <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>