1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74
|
<!-- CLISP man page driver -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:import href="http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl"/>
<!-- "common.xsl" is far too HTML-specific, so we cannot include it -->
<!-- and have to repeat some settings here explicitly: -->
<xsl:param name="variablelist.term.break.after" select="1"/>
<xsl:param name="variablelist.term.separator" select="''"/>
<xsl:template match="filename[@role='clisp-cvs']">
<xsl:apply-imports/> (file in the CLISP sources)
</xsl:template>
<!-- ==================================================================== -->
<!-- here we just convert comments into < ! - - ... - - >
for further processing with sed(1) (see Makefile) -->
<xsl:template match="comment()">
<xsl:text><!--</xsl:text> <!-- #\< ! - - -->
<xsl:variable name="content">
<xsl:call-template name="string.subst">
<xsl:with-param name="string"><xsl:value-of select="."/></xsl:with-param>
<xsl:with-param name="target" select="' '"/>
<xsl:with-param name="replacement" select="'--> <!--'"/>
</xsl:call-template>
</xsl:variable>
<xsl:value-of select="normalize-space($content)"/>
<xsl:text>--></xsl:text> <!-- - - #\> -->
</xsl:template>
<!-- the following tries to preserve the comments
it does not work because para|simpara|remark in list mode
calls normalize-space() and removes the whitespace around comments
<xsl:template match="comment()">
<xsl:text> .\"</xsl:text> <!- - #\Newline . \ " - ->
<xsl:variable name="content">
<xsl:call-template name="string.subst">
<xsl:with-param name="string"><xsl:value-of select="."/></xsl:with-param>
<xsl:with-param name="target" select="' '"/>
<xsl:with-param name="replacement" select="' .\"'"/>
</xsl:call-template>
</xsl:variable>
<xsl:value-of select="normalize-space($content)"/>
<xsl:if test="not(following-sibling::comment())">
<xsl:text> </xsl:text></xsl:if>
</xsl:template>
-->
<!-- the following two templates make synonym options appear on
separate lines (like we do in XHTML)
it is not clear whether this is a good idea: ".TP" does not guarantee
a new line, so the alternatives are:
-h, -/-help
Displays a help message on how to use clisp.
and
-h
-/-help Displays a help message on how to use CLISP.
it appears that the former is at least no worse than the latter,
so we disable these templates -->
<!--
<xsl:template match="varlistentry/term|glossterm">
<xsl:variable name="content"><xsl:apply-templates/></xsl:variable>
<xsl:value-of select="normalize-space($content)"/>
<xsl:text> .PD 0 .TP </xsl:text>
</xsl:template>
<xsl:template
match="varlistentry/term[position()=last()]|glossterm[position()=last()]"
priority="2">
<xsl:variable name="content"><xsl:apply-templates/></xsl:variable>
<xsl:value-of select="normalize-space($content)"/>
</xsl:template>
-->
</xsl:stylesheet>
|