Make sure convert.php works with php5.6.1 on linux
[plcapi.git] / doc / custom.xsl
1 <?xml version='1.0'?>\r
2 <xsl:stylesheet\r
3     xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">\r
4 <!--\r
5  Customization xsl stylesheet for docbook to chunked html transform\r
6  @author Gaetano Giunta\r
7  @copyright (c) 2007-2015 G. Giunta\r
8  @license code licensed under the BSD License\r
9  @todo make the xsl more dynamic: the path to import chunk.xsl could be f.e. rewritten/injected by the php user\r
10 -->\r
11 \r
12 \r
13 <!-- import base stylesheet -->\r
14 <xsl:import href="../../../tools/docbook-xsl/xhtml/chunk.xsl"/>\r
15 \r
16 \r
17 <!-- customization vars -->\r
18 <xsl:param name="draft.mode">no</xsl:param>\r
19 <xsl:param name="funcsynopsis.style">ansi</xsl:param>\r
20 <xsl:param name="html.stylesheet">xmlrpc.css</xsl:param>\r
21 <xsl:param name="id.warnings">0</xsl:param>\r
22 \r
23 \r
24 <!-- elements added / modified -->\r
25 \r
26 <!-- space between function name and opening parenthesis -->\r
27 <xsl:template match="funcdef" mode="ansi-nontabular">\r
28   <code>\r
29     <xsl:apply-templates select="." mode="class.attribute"/>\r
30     <xsl:apply-templates mode="ansi-nontabular"/>\r
31     <xsl:text> ( </xsl:text>\r
32   </code>\r
33 </xsl:template>\r
34 \r
35 <!-- space between return type and function name -->\r
36 <xsl:template match="funcdef/type" mode="ansi-nontabular">\r
37   <xsl:apply-templates mode="ansi-nontabular"/>\r
38   <xsl:text> </xsl:text>\r
39 </xsl:template>\r
40 \r
41 <!-- space between last param and closing parenthesis, remove tailing semicolon -->\r
42 <xsl:template match="void" mode="ansi-nontabular">\r
43   <code>void )</code>\r
44 </xsl:template>\r
45 \r
46 <xsl:template match="varargs" mode="ansi-nontabular">\r
47   <xsl:text>...</xsl:text>\r
48   <code> )</code>\r
49 </xsl:template>\r
50 \r
51 <xsl:template match="paramdef" mode="ansi-nontabular">\r
52   <xsl:apply-templates mode="ansi-nontabular"/>\r
53   <xsl:choose>\r
54     <xsl:when test="following-sibling::*">\r
55       <xsl:text>, </xsl:text>\r
56     </xsl:when>\r
57     <xsl:otherwise>\r
58       <code> )</code>\r
59     </xsl:otherwise>\r
60   </xsl:choose>\r
61 </xsl:template>\r
62 \r
63 <!-- param types get code formatted (leave a space after type, as it is supposed to be before param name) -->\r
64 <xsl:template match="paramdef/type" mode="ansi-nontabular">\r
65   <xsl:choose>\r
66     <xsl:when test="$funcsynopsis.decoration != 0">\r
67       <code>\r
68         <xsl:apply-templates mode="ansi-nontabular"/>\r
69       </code>\r
70     </xsl:when>\r
71     <xsl:otherwise>\r
72       <code>\r
73         <xsl:apply-templates mode="ansi-nontabular"/>\r
74       </code>\r
75     </xsl:otherwise>\r
76   </xsl:choose>\r
77   <xsl:text> </xsl:text>\r
78 </xsl:template>\r
79 \r
80 <!-- default values for function parameters -->\r
81 <xsl:template match="paramdef/initializer" mode="ansi-nontabular">\r
82   <xsl:text> = </xsl:text>\r
83   <xsl:apply-templates mode="ansi-nontabular"/>\r
84 </xsl:template>\r
85 \r
86 \r
87 </xsl:stylesheet>