first commit

This commit is contained in:
2026-02-07 09:46:32 +08:00
commit 5fcd5dc646
443 changed files with 89466 additions and 0 deletions

103
lib/phpxmlrpc/doc/build/custom.fo.xsl vendored Normal file
View File

@@ -0,0 +1,103 @@
<?xml version='1.0'?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:fo="http://www.w3.org/1999/XSL/Format">
<!--
Customization xsl stylesheet for docbook to pdf transform
@author Gaetano Giunta
@copyright (c) 2007-2015 G. Giunta
@license code licensed under the BSD License
@todo make the xsl more dynamic: the path to import docbook.xsl could be f.e. rewritten/injected by the php user
-->
<!-- import base stylesheet -->
<xsl:import href="../../../../vendor/docbook/docbook-xsl/fo/docbook.xsl"/>
<!-- customization vars -->
<xsl:param name="fop1.extensions">1</xsl:param>
<xsl:param name="draft.mode">no</xsl:param>
<xsl:param name="funcsynopsis.style">ansi</xsl:param>
<xsl:param name="id.warnings">0</xsl:param>
<xsl:param name="highlight.source">1</xsl:param>
<xsl:param name="highlight.default.language">php</xsl:param>
<xsl:param name="paper.type">A4</xsl:param>
<xsl:param name="shade.verbatim">1</xsl:param>
<xsl:attribute-set name="verbatim.properties">
<xsl:attribute name="font-size">80%</xsl:attribute>
</xsl:attribute-set>
<!-- elements added / modified -->
<xsl:template match="funcdef/function">
<xsl:choose>
<xsl:when test="$funcsynopsis.decoration != 0">
<fo:inline font-weight="bold">
<xsl:apply-templates/>
</fo:inline>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates/>
</xsl:otherwise>
</xsl:choose>
<xsl:text> </xsl:text>
</xsl:template>
<xsl:template match="funcdef/type">
<xsl:apply-templates/>
<xsl:text> </xsl:text>
</xsl:template>
<xsl:template match="void">
<xsl:choose>
<xsl:when test="$funcsynopsis.style='ansi'">
<xsl:text>( void )</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>( )</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="varargs">
<xsl:text>( ... )</xsl:text>
</xsl:template>
<xsl:template match="paramdef">
<xsl:variable name="paramnum">
<xsl:number count="paramdef" format="1"/>
</xsl:variable>
<xsl:if test="$paramnum=1">( </xsl:if>
<xsl:choose>
<xsl:when test="$funcsynopsis.style='ansi'">
<xsl:apply-templates/>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="./parameter"/>
</xsl:otherwise>
</xsl:choose>
<xsl:choose>
<xsl:when test="following-sibling::paramdef">
<xsl:text>, </xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text> )</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="paramdef/type">
<xsl:apply-templates/>
<xsl:text> </xsl:text>
</xsl:template>
<!-- default values for function parameters -->
<xsl:template match="paramdef/initializer">
<xsl:text> = </xsl:text>
<xsl:apply-templates/>
</xsl:template>
</xsl:stylesheet>

91
lib/phpxmlrpc/doc/build/custom.xsl vendored Normal file
View File

@@ -0,0 +1,91 @@
<?xml version='1.0'?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!--
Customization xsl stylesheet for docbook to chunked html transform
@author Gaetano Giunta
@copyright (c) 2007-2015 G. Giunta
@license code licensed under the BSD License
@todo make the xsl more dynamic: the path to import chunk.xsl could be f.e. rewritten/injected by the php user.
This would be needed f.e. if the lib is installed as a dependency and is not the top-level composer project.
Note: according to http://stackoverflow.com/questions/9861355/using-dynamic-href-in-xslt-import-include this is
not easy to do - it would have to be done f.e. by the invoking php script...
-->
<!-- import base stylesheet -->
<xsl:import href="../../../../vendor/docbook/docbook-xsl/xhtml/chunk.xsl"/>
<!-- customization vars -->
<xsl:param name="draft.mode">no</xsl:param>
<xsl:param name="funcsynopsis.style">ansi</xsl:param>
<xsl:param name="html.stylesheet">xmlrpc.css</xsl:param>
<xsl:param name="id.warnings">0</xsl:param>
<!-- elements added / modified -->
<!-- space between function name and opening parenthesis -->
<xsl:template match="funcdef" mode="ansi-nontabular">
<code>
<xsl:apply-templates select="." mode="class.attribute"/>
<xsl:apply-templates mode="ansi-nontabular"/>
<xsl:text> ( </xsl:text>
</code>
</xsl:template>
<!-- space between return type and function name -->
<xsl:template match="funcdef/type" mode="ansi-nontabular">
<xsl:apply-templates mode="ansi-nontabular"/>
<xsl:text> </xsl:text>
</xsl:template>
<!-- space between last param and closing parenthesis, remove tailing semicolon -->
<xsl:template match="void" mode="ansi-nontabular">
<code>void )</code>
</xsl:template>
<xsl:template match="varargs" mode="ansi-nontabular">
<xsl:text>...</xsl:text>
<code> )</code>
</xsl:template>
<xsl:template match="paramdef" mode="ansi-nontabular">
<xsl:apply-templates mode="ansi-nontabular"/>
<xsl:choose>
<xsl:when test="following-sibling::*">
<xsl:text>, </xsl:text>
</xsl:when>
<xsl:otherwise>
<code> )</code>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<!-- param types get code formatted (leave a space after type, as it is supposed to be before param name) -->
<xsl:template match="paramdef/type" mode="ansi-nontabular">
<xsl:choose>
<xsl:when test="$funcsynopsis.decoration != 0">
<code>
<xsl:apply-templates mode="ansi-nontabular"/>
</code>
</xsl:when>
<xsl:otherwise>
<code>
<xsl:apply-templates mode="ansi-nontabular"/>
</code>
</xsl:otherwise>
</xsl:choose>
<xsl:text> </xsl:text>
</xsl:template>
<!-- default values for function parameters -->
<xsl:template match="paramdef/initializer" mode="ansi-nontabular">
<xsl:text> = </xsl:text>
<xsl:apply-templates mode="ansi-nontabular"/>
</xsl:template>
</xsl:stylesheet>