Docs
----
-The manual, in HTML and pdf versions, can be found in the doc/ directory.
-Use of this software is subject to the terms in doc/index.html
+The manual can be found in the doc/manual directory, in HTML and PDF versions for release tarballs and Docbook always.
+
+Use of this software is subject to the terms in the [license.txt](license.txt) file
SSL-certificate
---------------
-<?xml version='1.0'?>\r
-<xsl:stylesheet\r
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"\r
- xmlns:fo="http://www.w3.org/1999/XSL/Format">\r
-<!--\r
- Customization xsl stylesheet for docbook to pdf transform\r
- @author Gaetano Giunta\r
- @copyright (c) 2007-2015 G. Giunta\r
- @license code licensed under the BSD License\r
- @todo make the xsl more dynamic: the path to import docbook.xsl could be f.e. rewritten/injected by the php user\r
--->\r
-\r
-\r
-<!-- import base stylesheet -->\r
-<xsl:import href="../../../vendor/docbook/docbook-xsl/fo/docbook.xsl"/>\r
-\r
-\r
-<!-- customization vars -->\r
-<xsl:param name="fop1.extensions">1</xsl:param>\r
-<xsl:param name="draft.mode">no</xsl:param>\r
-<xsl:param name="funcsynopsis.style">ansi</xsl:param>\r
-<xsl:param name="id.warnings">0</xsl:param>\r
-<xsl:param name="highlight.source">1</xsl:param>\r
-<xsl:param name="highlight.default.language">php</xsl:param>\r
-<xsl:param name="paper.type">A4</xsl:param>\r
-<xsl:param name="shade.verbatim">1</xsl:param>\r
-\r
-<xsl:attribute-set name="verbatim.properties">\r
- <xsl:attribute name="font-size">80%</xsl:attribute>\r
-</xsl:attribute-set>\r
-\r
-\r
-<!-- elements added / modified -->\r
-<xsl:template match="funcdef/function">\r
- <xsl:choose>\r
- <xsl:when test="$funcsynopsis.decoration != 0">\r
- <fo:inline font-weight="bold">\r
- <xsl:apply-templates/>\r
- </fo:inline>\r
- </xsl:when>\r
- <xsl:otherwise>\r
- <xsl:apply-templates/>\r
- </xsl:otherwise>\r
- </xsl:choose>\r
- <xsl:text> </xsl:text>\r
-</xsl:template>\r
-\r
-<xsl:template match="funcdef/type">\r
- <xsl:apply-templates/>\r
- <xsl:text> </xsl:text>\r
-</xsl:template>\r
-\r
-<xsl:template match="void">\r
- <xsl:choose>\r
- <xsl:when test="$funcsynopsis.style='ansi'">\r
- <xsl:text>( void )</xsl:text>\r
- </xsl:when>\r
- <xsl:otherwise>\r
- <xsl:text>( )</xsl:text>\r
- </xsl:otherwise>\r
- </xsl:choose>\r
-</xsl:template>\r
-\r
-<xsl:template match="varargs">\r
- <xsl:text>( ... )</xsl:text>\r
-</xsl:template>\r
-\r
-<xsl:template match="paramdef">\r
- <xsl:variable name="paramnum">\r
- <xsl:number count="paramdef" format="1"/>\r
- </xsl:variable>\r
- <xsl:if test="$paramnum=1">( </xsl:if>\r
- <xsl:choose>\r
- <xsl:when test="$funcsynopsis.style='ansi'">\r
- <xsl:apply-templates/>\r
- </xsl:when>\r
- <xsl:otherwise>\r
- <xsl:apply-templates select="./parameter"/>\r
- </xsl:otherwise>\r
- </xsl:choose>\r
- <xsl:choose>\r
- <xsl:when test="following-sibling::paramdef">\r
- <xsl:text>, </xsl:text>\r
- </xsl:when>\r
- <xsl:otherwise>\r
- <xsl:text> )</xsl:text>\r
- </xsl:otherwise>\r
- </xsl:choose>\r
-</xsl:template>\r
-\r
-<xsl:template match="paramdef/type">\r
- <xsl:apply-templates/>\r
- <xsl:text> </xsl:text>\r
-</xsl:template>\r
-\r
-<!-- default values for function parameters -->\r
-<xsl:template match="paramdef/initializer">\r
- <xsl:text> = </xsl:text>\r
- <xsl:apply-templates/>\r
-</xsl:template>\r
-\r
-\r
+<?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>
\ No newline at end of file
<!-- import base stylesheet -->
-<xsl:import href="../vendor/docbook/docbook-xsl/xhtml/chunk.xsl"/>
+<xsl:import href="../../vendor/docbook/docbook-xsl/xhtml/chunk.xsl"/>
<!-- customization vars -->
+++ /dev/null
-<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [\r
-<!ENTITY dbstyle SYSTEM "/usr/lib/sgml/stylesheet/dsssl/docbook/nwalsh/html/docbook.dsl" CDATA DSSSL>\r
-]>\r
-\r
-<style-sheet>\r
-<style-specification use="docbook">\r
-<style-specification-body>\r
-\r
-(define %link-mailto-url%\r
- "edd@usefulinc.com")\r
-\r
-(define %html-ext%\r
- ".html")\r
-\r
-(define %use-id-as-filename%\r
- #t)\r
-\r
-(define %root-filename%\r
- "index")\r
-\r
-\r
-</style-specification-body>\r
-</style-specification>\r
-<external-specification id="docbook" document="dbstyle">\r
-</style-sheet>\r
-Copyright (c) 2004 David Holroyd, and contributors.\r
-\r
-Permission to use, copy, modify and distribute this software and its\r
-documentation for any purpose and without fee is hereby granted in\r
-perpetuity, provided that the above copyright notice appear in all\r
-copies, and that both the copyright notice and this permission notice\r
-appear in supporting documentation. The contributors make no\r
-representations about the suitability of this software for any\r
-purpose. It is provided "as is" without express or implied warranty.\r
-\r
-THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS\r
-SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND\r
-FITNESS. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY\r
-SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER\r
-RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF\r
-CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN\r
-CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\r
+Copyright (c) 2004 David Holroyd, and contributors.
+
+Permission to use, copy, modify and distribute this software and its
+documentation for any purpose and without fee is hereby granted in
+perpetuity, provided that the above copyright notice appear in all
+copies, and that both the copyright notice and this permission notice
+appear in supporting documentation. The contributors make no
+representations about the suitability of this software for any
+purpose. It is provided "as is" without express or implied warranty.
+
+THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
+SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
+SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
+RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
+CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-This stylesheet was writen by David Holroyd, with patches, suggestions,\r
-translations, and other help from these people:\r
-\r
- David Leppik\r
- Martin Gautier\r
- Asia Magiera\r
- Federico Koessler\r
- Katie McSweenie\r
-\r
-Many thanks to all of them!\r
+This stylesheet was writen by David Holroyd, with patches, suggestions,
+translations, and other help from these people:
+
+ David Leppik
+ Martin Gautier
+ Asia Magiera
+ Federico Koessler
+ Katie McSweenie
+
+Many thanks to all of them!
-<?xml version="1.0"?>\r
-<bindings xmlns="http://www.mozilla.org/xbl"\r
- xmlns:html="http://www.w3.org/1999/xhtml">\r
- <binding id="ulink">\r
- <handlers>\r
- <handler event="click" button="0"\r
- action="window.location=this.attributes.url.value;"/>\r
- <handler event="mouseover"\r
- action="window.status=this.attributes.url.value;"/>\r
- <handler event="mouseout"\r
- action="window.status=null;"/>\r
- </handlers>\r
- </binding>\r
-\r
- <binding id="image">\r
- <content>\r
- <html:img xbl:inherits="src=fileref"/>\r
- </content>\r
-\r
- <implementation>\r
- <constructor>\r
- var img = document.getAnonymousNodes(this)[0];\r
- var file = this.getAttribute("fileref");\r
- // HACK: using img.src=file 'inline' doesn't seem to work\r
- // but it does when called from a setTimeout()\r
- var f = function() { img.src = file; }\r
- setTimeout(f, 0);\r
- </constructor>\r
- </implementation>\r
- </binding>\r
-</bindings>\r
+<?xml version="1.0"?>
+<bindings xmlns="http://www.mozilla.org/xbl"
+ xmlns:html="http://www.w3.org/1999/xhtml">
+ <binding id="ulink">
+ <handlers>
+ <handler event="click" button="0"
+ action="window.location=this.attributes.url.value;"/>
+ <handler event="mouseover"
+ action="window.status=this.attributes.url.value;"/>
+ <handler event="mouseout"
+ action="window.status=null;"/>
+ </handlers>
+ </binding>
+
+ <binding id="image">
+ <content>
+ <html:img xbl:inherits="src=fileref"/>
+ </content>
+
+ <implementation>
+ <constructor>
+ var img = document.getAnonymousNodes(this)[0];
+ var file = this.getAttribute("fileref");
+ // HACK: using img.src=file 'inline' doesn't seem to work
+ // but it does when called from a setTimeout()
+ var f = function() { img.src = file; }
+ setTimeout(f, 0);
+ </constructor>
+ </implementation>
+ </binding>
+</bindings>
<?xml version="1.0" encoding="UTF-8"?>
-<?xml-stylesheet href="docbook-css/driver.css" type="text/css"?>
+<?xml-stylesheet href="css-docbook/driver.css" type="text/css"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<!--
<sect1 id="jellyfish" xreflabel="The Jellyfish Book">
<title>The Jellyfish Book</title>
- <para><graphic align="right" depth="190" fileref="progxmlrpc.s.gif"
+ <para><graphic align="right" depth="190" fileref="images/progxmlrpc.s.gif"
format="GIF" width="145" />Together with Simon St.Laurent and Joe
Johnston, Edd Dumbill wrote a book on XML-RPC for O'Reilly and
Associates on XML-RPC. It features a rather fetching jellyfish on the
<para>The interface should be self-explicative enough to need little
documentation.</para>
- <para><graphic align="center" fileref="debugger.gif"
+ <para><graphic align="center" fileref="images/debugger.gif"
format="GIF" /></para>
<para>The most useful feature of the debugger is without doubt the "Show
'fop' => 'fop',
'php' => 'php'
);
+ protected static $options = array(
+ 'repo' => 'https://github.com/gggeek/phpxmlrpc',
+ 'branch' => 'php53'
+ );
public static function libVersion()
{
+ if (self::$libVersion == null)
+ throw new \Exception('Missing library version argument');
return self::$libVersion;
}
);
}
- public static function sourceRepo()
- {
- return 'https://github.com/gggeek/phpxmlrpc';
- }
-
/// @todo move git branch to be a named option?
public static function getOpts($args=array(), $cliOpts=array())
{
- if (count($args) < 1)
- throw new \Exception('Missing library version argument');
- self::$libVersion = $args[0];
+ if (count($args) > 0)
+ // throw new \Exception('Missing library version argument');
+ self::$libVersion = $args[0];
if (count($args) > 1)
self::$sourceBranch = $args[1];
}
}
+ foreach (self::$options as $name => $value) {
+ if (isset($cliOpts[$name])) {
+ self::$options[$name] = $cliOpts[$name];
+ }
+ }
+
//pake_echo('---'.self::$libVersion.'---');
}
return self::$tools[$name];
}
+ public static function option($name)
+ {
+ return self::$options[$name];
+ }
+
/**
* @param string $inFile
* @param string $xssFile
echo "Syntax: pake {\$pake-options} \$task \$lib-version [\$git-tag] {\$task-options}\n";
echo "\n";
echo " Run 'pake help' to list all pake options\n";
- echo " Run 'pake -T' to list all available tasks\n";
+ echo " Run 'pake -T' to list available tasks\n";
+ echo " Run 'pake -P' to list all available tasks (including hidden ones) and their dependencies\n";
+ echo "\n";
echo " Task options:\n";
- echo " --php=\$php";
- echo " --fop=\$fop";
- echo " --zip=\$zip";
+ echo " --repo=REPO URL of the source repository to clone. defaults to the github repo.\n";
+ echo " --branch=BRANCH The git branch to build from.\n";
+ echo " --php=PHP Location of the php command-line interpreter\n";
+ echo " --fop=FOP Location of the fop command-line tool\n";
+ echo " --zip=ZIP Location of the zip tool\n";
}
function run_getopts($task=null, $args=array(), $cliOpts=array())
{
// download the current version into the workspace
$targetDir = Builder::workspaceDir();
- $targetBranch = 'php53';
// check if workspace exists and is not already set to the correct repo
if (is_dir($targetDir) && pakeGit::isRepository($targetDir)) {
$repo = new pakeGit($targetDir);
$remotes = $repo->remotes();
- if (trim($remotes['origin']['fetch']) != Builder::sourceRepo()) {
+ if (trim($remotes['origin']['fetch']) != Builder::option('repo')) {
throw new Exception("Directory '$targetDir' exists and is not linked to correct git repo");
}
$repo->pull();
} else {
pake_mkdirs(dirname($targetDir));
- $repo = pakeGit::clone_repository(Builder::sourceRepo(), Builder::workspaceDir());
+ $repo = pakeGit::clone_repository(Builder::option('repo'), Builder::workspaceDir());
}
- $repo->checkout($targetBranch);
+ $repo->checkout(Builder::option('branch'));
}
/**
function run_clean_doc()
{
- pake_remove_dir(Builder::workspaceDir().'/doc/out');
- pake_remove_dir(Builder::workspaceDir().'/doc/javadoc-out');
+ //pake_remove_dir(Builder::workspaceDir().'/doc/out');
+ pake_remove_dir(Builder::workspaceDir().'/doc/api');
+ $finder = pakeFinder::type('file')->name('*.html');
+ pake_remove($finder, Builder::workspaceDir().'/doc/manual');
}
/**
// API docs from phpdoc comments using phpdocumentor
$cmd = Builder::tool('php');
- pake_sh("$cmd vendor/phpdocumentor/phpdocumentor/bin/phpdoc run -d ".Builder::workspaceDir().'/src'." -t ".Builder::workspaceDir().'/doc/javadoc-out --title PHP-XMLRPC');
+ pake_sh("$cmd vendor/phpdocumentor/phpdocumentor/bin/phpdoc run -d ".Builder::workspaceDir().'/src'." -t ".Builder::workspaceDir().'/doc/api --title PHP-XMLRPC');
# Jade cmd yet to be rebuilt, starting from xml file and putting output in ./out dir, e.g.
# jade -t xml -d custom.dsl xmlrpc_php.xml
# -Dxslthl.config=file:///c:/htdocs/xmlrpc_cvs/docbook-xsl/highlighting/xslthl-config.xml \
# com.icl.saxon.StyleSheet -o xmlrpc_php.fo.xml xmlrpc_php.xml custom.fo.xsl use.extensions=1
- pake_mkdirs($docDir.'/out');
+ //pake_mkdirs($docDir.'/out');
// HTML files from docbook
- Builder::applyXslt($docDir.'/xmlrpc_php.xml', $docDir.'/custom.xsl', $docDir.'/out/');
+ Builder::applyXslt($docDir.'/manual/phpxmlrpc_manual.xml', $docDir.'/build/custom.xsl', $docDir.'/manual');
// post process html files to highlight php code samples
- foreach(pakeFinder::type('file')->name('*.html')->in($docDir) as $file)
+ foreach(pakeFinder::type('file')->name('*.html')->in($docDir.'/manual') as $file)
{
file_put_contents($file, Builder::highlightPhpInHtml(file_get_contents($file)));
}
// PDF file from docbook
// convert to fo and then to pdf using apache fop
- Builder::applyXslt($docDir.'/xmlrpc_php.xml', $docDir.'/custom.fo.xsl', $docDir.'/xmlrpc_php.fo.xml');
+ Builder::applyXslt($docDir.'/manual/phpxmlrpc_manual.xml', $docDir.'/build/custom.fo.xsl', $docDir.'/manual/phpxmlrpc_manual.fo.xml');
$cmd = Builder::tool('fop');
- pake_sh("$cmd $docDir/xmlrpc_php.fo.xml $docDir/xmlrpc_php.pdf");
- unlink($docDir.'/xmlrpc_php.fo.xml');
+ pake_sh("$cmd $docDir/phpxmlrpc_manual.fo.xml $docDir/phpxmlrpc_manual.pdf");
+ unlink($docDir.'/manual/phpxmlrpc_manual.fo.xml');
}
function run_clean_dist()
chdir($cwd);
}
+function run_clean_workspace($task=null, $args=array(), $cliOpts=array())
+{
+ pake_remove_dir(Builder::workspaceDir());
+}
+
/**
- * Cleans up the build directory
+ * Cleans up the whole build directory
* @todo 'make clean' usually just removes the results of the build, distclean removes all but sources
*/
function run_clean($task=null, $args=array(), $cliOpts=array())
pake_task('dist', 'getopts', 'init', 'build', 'clean-dist');
pake_task('clean-doc', 'getopts');
pake_task('clean-dist', 'getopts');
+pake_task('clean-workspace', 'getopts');
pake_task('clean', 'getopts');
}