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