3 xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
4 xmlns:fo="http://www.w3.org/1999/XSL/Format">
6 Customization xsl stylesheet for docbook to pdf transform
8 @copyright (c) 2007-2015 G. Giunta
9 @license code licensed under the BSD License
10 @todo make the xsl more dynamic: the path to import docbook.xsl could be f.e. rewritten/injected by the php user
14 <!-- import base stylesheet -->
15 <xsl:import href="../../../../vendor/docbook/docbook-xsl/fo/docbook.xsl"/>
18 <!-- customization vars -->
19 <xsl:param name="fop1.extensions">1</xsl:param>
20 <xsl:param name="draft.mode">no</xsl:param>
21 <xsl:param name="funcsynopsis.style">ansi</xsl:param>
22 <xsl:param name="id.warnings">0</xsl:param>
23 <xsl:param name="highlight.source">1</xsl:param>
24 <xsl:param name="highlight.default.language">php</xsl:param>
25 <xsl:param name="paper.type">A4</xsl:param>
26 <xsl:param name="shade.verbatim">1</xsl:param>
28 <xsl:attribute-set name="verbatim.properties">
29 <xsl:attribute name="font-size">80%</xsl:attribute>
33 <!-- elements added / modified -->
34 <xsl:template match="funcdef/function">
36 <xsl:when test="$funcsynopsis.decoration != 0">
37 <fo:inline font-weight="bold">
38 <xsl:apply-templates/>
42 <xsl:apply-templates/>
45 <xsl:text> </xsl:text>
48 <xsl:template match="funcdef/type">
49 <xsl:apply-templates/>
50 <xsl:text> </xsl:text>
53 <xsl:template match="void">
55 <xsl:when test="$funcsynopsis.style='ansi'">
56 <xsl:text>( void )</xsl:text>
59 <xsl:text>( )</xsl:text>
64 <xsl:template match="varargs">
65 <xsl:text>( ... )</xsl:text>
68 <xsl:template match="paramdef">
69 <xsl:variable name="paramnum">
70 <xsl:number count="paramdef" format="1"/>
72 <xsl:if test="$paramnum=1">( </xsl:if>
74 <xsl:when test="$funcsynopsis.style='ansi'">
75 <xsl:apply-templates/>
78 <xsl:apply-templates select="./parameter"/>
82 <xsl:when test="following-sibling::paramdef">
83 <xsl:text>, </xsl:text>
86 <xsl:text> )</xsl:text>
91 <xsl:template match="paramdef/type">
92 <xsl:apply-templates/>
93 <xsl:text> </xsl:text>
96 <!-- default values for function parameters -->
97 <xsl:template match="paramdef/initializer">
98 <xsl:text> = </xsl:text>
99 <xsl:apply-templates/>