<xsl:include href="links.xsl"/>
<xsl:include href="table.xsl"/>
- <xsl:param name="generate.manifest">0</xsl:param>
+ <xsl:param name="man.manifest.enabled">0</xsl:param>
<xsl:param name="man.manifest.filename">MAN.MANIFEST</xsl:param>
<xsl:param name="man.segtitle.suppress">0</xsl:param>
<xsl:param name="man.indentation.default.adjust">0</xsl:param>
<xsl:param name="man.table.headings.font">B</xsl:param>
<xsl:param name="man.table.title.font">B</xsl:param>
<xsl:param name="man.table.footnotes.separator.line">----</xsl:param>
+ <xsl:param name="man.base.dir">man/</xsl:param>
+ <xsl:param name="man.subdirs.enabled" select="1"/>
<!-- ==================================================================== -->
<!-- * Check to see if we have any refentry children in this -->
<!-- * 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)">
+ <!-- * if $man.manifest.enabled is non-zero, generate a manifest file -->
+ <xsl:if test="not($man.manifest.enabled = 0)">
<xsl:call-template name="generate.manifest">
<xsl:with-param name="filename">
<xsl:choose>
<!-- * Otherwise, if user has unset -->
<!-- * $man.manifest.filename, default to using -->
<!-- * "MAN.MANIFEST" as the filename. Because -->
- <!-- * $generate.manifest is non-zero and so we -->
+ <!-- * $man.manifest.enabled is non-zero and so we -->
<!-- * must have a filename in order to generate -->
<!-- * the manifest. -->
<xsl:text>MAN.MANIFEST</xsl:text>
<!-- ================================================================== -->
- <!-- * Replace any spaces in $name with underscores & then append -->
- <!-- * .$section to create a man filename -->
-
<xsl:template name="make.adjusted.man.filename">
<xsl:param name="name"/>
<xsl:param name="section"/>
+ <xsl:param name="dirname">
+ <xsl:choose>
+ <xsl:when test="not($man.subdirs.enabled = 0)">
+ <xsl:value-of
+ select="concat($man.base.dir, 'man', normalize-space($section), '/')"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$man.base.dir"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:param>
<xsl:call-template name="string.subst">
+ <!-- * Replace any spaces in filename with underscores & then append -->
+ <!-- * a dot plus a section number to create the man filename -->
<xsl:with-param name="string"
- select="concat(normalize-space($name), '.', normalize-space($section))"/>
+ select="concat($dirname,
+ normalize-space($name),
+ '.', normalize-space($section))"/>
<xsl:with-param name="target" select="' '"/>
<xsl:with-param name="replacement" select="'_'"/>
</xsl:call-template>