]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
nroff: Render seealso elements as SEE ALSO man page section instead of suppressing...
authorRich Bowen <rbowen@apache.org>
Wed, 29 Apr 2026 18:16:24 +0000 (18:16 +0000)
committerRich Bowen <rbowen@apache.org>
Wed, 29 Apr 2026 18:16:24 +0000 (18:16 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1933514 13f79535-47bb-0310-9956-ffa450edef68

docs/manual/style/xsl/nroff.xsl

index de3a3ccdc8ed6a6fd5356249c4d533ba11f16667..ecd78c8c03741a35f0d47bf7d19f9f660f735695 100644 (file)
 <xsl:apply-templates select="section[@id='synopsis']" />&lf;
 <xsl:apply-templates select="summary" />&lf;
 <xsl:apply-templates select="section[@id!='synopsis']" />&lf;
+
+<!-- SEE ALSO section from seealso elements -->
+<xsl:if test="seealso">
+<xsl:text>.SH "SEE ALSO"</xsl:text>&lf;
+<xsl:for-each select="seealso">
+<xsl:apply-templates select="." mode="seealso" />
+<xsl:if test="position() != last()">, </xsl:if>
+</xsl:for-each>&lf;
+</xsl:if>
 </xsl:template>
 <!-- /manualpage -->
 
@@ -381,7 +390,19 @@ FATAL: only tables with two (2) columns are supported.
 <!-- ==================================================================== -->
 <!-- remove some stuff from the output                                    -->
 <!-- ==================================================================== -->
-<xsl:template match="parentdocument|seealso|dd|td|example/br|dd/br" />
+<xsl:template match="parentdocument|dd|td|example/br|dd/br" />
+
+<!-- suppress seealso in normal flow (rendered separately in SEE ALSO) -->
+<xsl:template match="seealso" />
+
+<!-- ==================================================================== -->
+<!-- seealso mode: extract plain text for SEE ALSO section                -->
+<!-- ==================================================================== -->
+<xsl:template match="seealso" mode="seealso">
+<xsl:variable name="text" select="normalize-space(.)" />
+<xsl:text>
+</xsl:text><xsl:value-of select="$text" />
+</xsl:template>
 
 
 <!-- ==================================================================== -->