jkj Sun Feb 11 13:51:24 2001 EDT Added files: /phpdoc README.xsl html-common.xsl Modified files: /phpdoc bightml.xsl.in Log: - improved formatting of functions and function reference - added brief information about using XSL stylesheets Index: phpdoc/bightml.xsl.in diff -u phpdoc/bightml.xsl.in:1.1 phpdoc/bightml.xsl.in:1.2 --- phpdoc/bightml.xsl.in:1.1 Thu Feb 8 04:45:29 2001 +++ phpdoc/bightml.xsl.in Sun Feb 11 13:51:24 2001 @@ -2,13 +2,14 @@ HTML specific stylesheet - $Id: bightml.xsl.in,v 1.1 2001/02/08 12:45:29 jkj Exp $ + $Id: bightml.xsl.in,v 1.2 2001/02/11 21:51:24 jkj Exp $ --> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:import href="@DOCBOOKXSL_BIGHTML@"/> +<xsl:include href="html-common.xsl"/> <xsl:output method="html" encoding="@ENCODING@"/> Index: phpdoc/README.xsl +++ phpdoc/README.xsl THIS README FILE CONTAINS NOTES ON USING XSL STYLESHEETS TO FORMAT PHP DOCUMENTATION REQUIRED PACKAGES: ------------------ In order to successfully use XSL support you must have some XSLT processor and XSL DocBook Stylesheets. This is sufficient for generating HTML version of documentation. If you also want to create version suitable for print, you will additionally need FO processor. XSLT processors: XT: http://www.jclark.com/xml/xt.html Saxon: http://users.iclway.co.uk/mhkay/saxon/ Xalan: http://xml.apache.org/xalan/ XSL DocBook Stylesheets: http://www.nwalsh.com/docbook/xsl/index.html FO processors: PassiveTeX: http://users.ox.ac.uk/~rathz/passivetex/ FOP: http://xml.apache.org/fop/ XEP: http://www.renderx.com/ USAGE: ------ At this time there are no XSL specific targets in Makefile. This is because there are not standardized ways to invoke XSLT processor. To use XSL stylesheets you must run configure script and tell it, where is placed your copy of XSL DocBook Stylesheets. Majority of XSLT processor require URL instead of filename, so be sure to prepend file:/// schema before path: autoconf ./configure --with-xsl=file:///path/to/docbook/xsl/styles Configure will create three files html.xsl, bightml.xsl and print.xsl among others. These files can be used to generate desired output. html.xsl generates set of small files, bightml.xsl generates one large file and print.xsl generates file with FO object suitable for further processing with some FO processor. Invocation of XSLT processor is processor dependent, for now suppose that you have shell script called saxon which is able to invoke Saxon processor. Run: mkdir html saxon manual.xml html.xsl - to get HTML version of documentation saxon -o bigmanual.html manual.xml bightml.xsl - to get whole documentation in one large HTML file saxon -o manual.fo manual.xml print.xsl - to get FO file For getting PDF from FO file you must run some FO processor on FO file. PERFORMANCE COMMENTS: --------------------- Generating bigmanual.html with Saxon (under JDK 1.3) takes about two minutes on Celeron 400 computer. Generating FO files takes about two times more + plus time required to run FO processor. Generating chunked version of manual is on my machine approximately two times slower than with Jade. LIMITATIONS: ------------ Not all customization from DSSSL are backported to XSL, so some things does not work for now. Hope, this will change in the near future. Jirka Kosek <[EMAIL PROTECTED]> Last modified $Date: 2001/02/11 21:51:24 $ Index: phpdoc/html-common.xsl +++ phpdoc/html-common.xsl <!-- Common HTML customizations $Id: html-common.xsl,v 1.1 2001/02/11 21:51:24 jkj Exp $ --> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:param name="funcsynopsis.style">ansi</xsl:param> <xsl:param name="funcsynopsis.decoration">1</xsl:param> <xsl:param name="refentry.generate.name">0</xsl:param> <!-- We do not want semicolon at the end of prototype --> <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> <!-- Enclose functions in links, add parenthesis --> <xsl:template match="function"> <xsl:choose> <xsl:when test="name(parent::*)!='funcdef'"> <xsl:choose> <xsl:when test="ancestor::refentry/refnamediv/refname!=translate(current(),'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz')"> <a> <xsl:attribute name="href"> <xsl:call-template name="href.target"> <xsl:with-param name="object" select="id(concat('function.', translate(string(current()),'_','-')))"/> </xsl:call-template> </xsl:attribute> <xsl:call-template name="inline.boldseq"> <xsl:with-param name="content"> <xsl:apply-templates/> <xsl:text>()</xsl:text> </xsl:with-param> </xsl:call-template> </a> </xsl:when> <xsl:otherwise> <xsl:call-template name="inline.boldseq"> <xsl:with-param name="content"> <xsl:apply-templates/> <xsl:text>()</xsl:text> </xsl:with-param> </xsl:call-template> </xsl:otherwise> </xsl:choose> </xsl:when> <xsl:otherwise> <xsl:call-template name="inline.monoseq"/> </xsl:otherwise> </xsl:choose> </xsl:template> <!-- To overcome precedence issues --> <xsl:template match="funcdef/function"> <xsl:choose> <xsl:when test="$funcsynopsis.decoration != 0"> <b class="fsfunc"><xsl:apply-templates/></b> </xsl:when> <xsl:otherwise> <xsl:apply-templates/> </xsl:otherwise> </xsl:choose> </xsl:template> <!-- Title abbreviations are not used in HTML output AFAIK --> <xsl:template match="titleabbrev"/> </xsl:stylesheet>