diff --git a/.gitignore b/.gitignore index c325e318..244a3179 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,8 @@ docs/dsssl/html-common.dsl docs/entities/file-entities.ent docs/entities/version.ent docs/html +docs/manual.fo +docs/manual.pdf docs/manual.xml docs/phpweb docs/revcheck.html diff --git a/docs/.cvsignore b/docs/.cvsignore index 5fa6a70a..121d3650 100644 --- a/docs/.cvsignore +++ b/docs/.cvsignore @@ -8,3 +8,5 @@ html phpweb diff revcheck.html +manual.fo +manual.pdf diff --git a/docs/Makefile.in b/docs/Makefile.in index 417e6fa8..05c9850e 100755 --- a/docs/Makefile.in +++ b/docs/Makefile.in @@ -25,6 +25,8 @@ PHP=@PHP@ LANG=@LANG@ NSGMLS=@NSGMLS@ JADE=@JADE@ -D . -wno-idref +XSLTPROC=@XSLTPROC@ +FOP=@FOP@ XMLDCL=./dtds/dbxml-4.1.2/phpdocxml.dcl CATALOG=@CATALOG@ HTML_STYLESHEET=dsssl/html.dsl @@ -48,6 +50,10 @@ web: FORCE $(PHP) scripts/generate_web.php $(PHP) scripts/html_syntax.php php phpweb/ +pdf: FORCE + ${XSLTPROC} -o manual.fo xsl/fo.xsl manual.xml + ${FOP} -fo manual.fo -pdf manual.pdf + test: $(NSGMLS) -i lang-$(LANG) -s $(XMLDCL) manual.xml @@ -58,8 +64,8 @@ revcheck: FORCE # {{{ cleanup clean: - rm -f Makefile config.* manual.xml configure entities/version.ent *.fot dsssl/html-common.dsl - rm -f revcheck.html file-entities.php entities/file-entities.ent scripts/file-entities.php + rm -f Makefile config.* manual.xml configure entities/version.ent *.fot dsssl/html-common.dsl manual.pdf + rm -f revcheck.html file-entities.php entities/file-entities.ent scripts/file-entities.php manual.fo rm -fr autom4te.cache html phpweb # }}} diff --git a/docs/README b/docs/README index 87c8c4a0..c609ed52 100644 --- a/docs/README +++ b/docs/README @@ -15,6 +15,16 @@ MAKE: * make (to make plain html) * make web (to make docs for website) + +Generate PDF files +================== +In order to generate PDF files you need some tools: + * Apache FOP (http://xml.apache.org/fop/) + * JRE 1.2 or later + +To generate the file, just type 'make pdf' + + Revision Tracking (for translations): * make revcheck (this will create revcheck.html) diff --git a/docs/configure.in b/docs/configure.in index 82e27160..db07715d 100755 --- a/docs/configure.in +++ b/docs/configure.in @@ -171,6 +171,90 @@ AC_SUBST(NSGMLS) dnl }}} +dnl {{{ check for xsltproc + +AC_ARG_WITH(xsltproc, +[ --with-xsltproc=PATH look for xsltproc], +[ + if test $withval != "yes"; then + AC_MSG_CHECKING([for xsltproc]) + if test -x $withval -a -f $withval + then + XSLTPROC=$withval + AC_MSG_RESULT($XSLTPROC) + else + XSLTPROC=no + AC_MSG_RESULT(no) + AC_MSG_ERROR([$withval: not an executable file]) + fi + else + if test -e ../../phpdoc-tools/libxml/xsltproc.exe ; then + AC_MSG_CHECKING([for xsltproc]) + XSLTPROC=../../phpdoc-tools/libxml/xsltproc.exe + AC_MSG_RESULT($XSLTPROC) + else + AC_PATH_PROG(XSLTPROC,"xsltproc",no) + fi + fi +],[ + if test -e ../../phpdoc-tools/libxml/xsltproc.exe ; then + AC_MSG_CHECKING([for xsltproc]) + XSLTPROC=../../phpdoc-tools/libxml/xsltproc.exe + AC_MSG_RESULT($XSLTPROC) + else + AC_PATH_PROG(XSLTPROC,"xsltproc",no) + fi +] +) +if test $XSLTPROC = "no"; then + AC_MSG_WARN([no xsltproc binary found, XSL Transformations won't work]) +fi +AC_SUBST(XSLTPROC) + +dnl }}} + +dnl {{{ check for FOP + +AC_ARG_WITH(fop, +[ --with-fop=PATH look for fop], +[ + if test $withval != "yes"; then + AC_MSG_CHECKING([for FOP]) + if test -x $withval -a -f $withval + then + FOP=$withval + AC_MSG_RESULT($FOP) + else + FOP=no + AC_MSG_RESULT(no) + AC_MSG_ERROR([$withval: not an executable file]) + fi + else + if test -e ../../phpdoc-tools/fop/fop.bat ; then + AC_MSG_CHECKING([for FOP]) + FOP=../../phpdoc-tools/fop/fop.bat + AC_MSG_RESULT($FOP) + else + AC_PATH_PROG(FOP,"fop",no) + fi + fi +],[ + if test -e ../../phpdoc-tools/fop/fop.bat ; then + AC_MSG_CHECKING([for xsltproc]) + FOP=../../phpdoc-tools/fop/fop.bat + AC_MSG_RESULT($FOP) + else + AC_PATH_PROG(FOP,"fop",no) + fi +] +) +if test $FOP = "no"; then + AC_MSG_WARN([no fop binary found, PDF generation work]) +fi +AC_SUBST(FOP) + +dnl }}} + dnl }}} dnl {{{ check for catalog files diff --git a/docs/xsl/common.xsl b/docs/xsl/common.xsl new file mode 100644 index 00000000..abb1e26a --- /dev/null +++ b/docs/xsl/common.xsl @@ -0,0 +1,190 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + (void) + + + + + + + + + + + + + + ( + + [ + + + + + + + + [, + + + , + + + + + + + ] + + + + ] + + ) + + + + + + + + + + + + + , + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/xsl/docbook/BUGS b/docs/xsl/docbook/BUGS new file mode 100755 index 00000000..5723ffd3 --- /dev/null +++ b/docs/xsl/docbook/BUGS @@ -0,0 +1,6 @@ +The fo stylesheet is probably not in perfect sync with the html stylesheet + +Using Equations w/o titles results in incorrectly numbered + equations with titles. Use InformalEquation instead. + +The 'char' alignment in tables is not supported diff --git a/docs/xsl/docbook/PHPDOC-NOTE b/docs/xsl/docbook/PHPDOC-NOTE new file mode 100755 index 00000000..699ccb41 --- /dev/null +++ b/docs/xsl/docbook/PHPDOC-NOTE @@ -0,0 +1,13 @@ +This is a minimal version of the DocBook XSL Style Sheet +distribution, which you can download from +http://docbook.sourceforge.net/. + +Nothing is modified in these files, all files are left untouched, +so these are the same ones you can find in the distribution. We +omitted some files and directories though, and only left those that +we use for output generation. + +The reason to put this to phpdoc was to encourage compatibility, +so we don't need to force users to have a specific version of +the XSL style sheets locally, but we can still rely on a version +of the sheets we tested our customizations with. \ No newline at end of file diff --git a/docs/xsl/docbook/README b/docs/xsl/docbook/README new file mode 100755 index 00000000..a7190b38 --- /dev/null +++ b/docs/xsl/docbook/README @@ -0,0 +1,107 @@ +README for the DocBook Stylesheets + +These are XSL stylesheets for the DocBook XML DTD. (They would +also work for the DocBook DTD, modulo certain namecase problems +and the fact that there aren't (yet) any XSL implementations +that work with SGML source documents.) + +As of version 1.0, most of the elements in DocBook are handled +in some way or another, usually reasonably, but there's still +lots of work to be done. + +For more information, see http://docbook.sourceforge.net/ + +Manifest +-------- + +README this file +TODO planned features not yet implemented (may be incomplete :-) +BUGS known problems (may also be incomplete :-) +VERSION the current version number (note that this is an XSL stylesheet, + included by both fo/docbook.xsl and html/docbook.xsl) +WhatsNew changes since the last public release (for a complete list + of changes, see the ChangeLog file(s)) +common/ contains code common to both stylesheets +doc/ documentation +docsrc/ documentation sources +extensions/ Java extensions +fo/ stylesheets that produce XSL FO +html/ stylesheets that produce HTML +htmlhelp/ stylesheets that produce HTML Help +images/ images +javahelp/ stylesheets that produce Java Help +lib/ contains schema-independent functions +template/ contains templates for building stylesheet customization layers +xhtml/ stylesheets that produce XHTML + +Changes +------- + +See the ChangeLog in each directory for additional information +about the specific changes. + +See WhatsNew for changes since the last release. + +Installation +------------ + +Unpack the distribution somewhere. + +Use +--- + +Process your DocBook documents with one of the following stylesheets +using your favorite XSLT processor: + + xhtml/docbook.xsl - for XHTML + html/docbook.xsl - for HTML (as a single file) + html/chunk.xsl - for HTML (multiple files) + fo/docbook.xsl - for XSL FO + htmlhelp/htmlhelp.xsl - for HTML Help + javahelp/javahelp.xsl - for JavaHelp + +Copyright +--------- + +Copyright (C) 1999, 2000, 2001, 2002 Norman Walsh + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the ``Software''), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +Except as contained in this notice, the names of individuals +credited with contribution to this software shall not be used in +advertising or otherwise to promote the sale, use or other +dealings in this Software without prior written authorization +from the individuals in question. + +Any stylesheet derived from this Software that is publically +distributed will be identified with a different name and the +version strings in any derived Software will be changed so that +no possibility of confusion between the derived package and this +Software will exist. + +Warranty +-------- + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL NORMAN WALSH OR ANY OTHER +CONTRIBUTOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +Contacting the Author +--------------------- + +These stylesheets are maintained by Norman Walsh, . diff --git a/docs/xsl/docbook/VERSION b/docs/xsl/docbook/VERSION new file mode 100755 index 00000000..d0ad7437 --- /dev/null +++ b/docs/xsl/docbook/VERSION @@ -0,0 +1,6 @@ + + +1.60.1 + + diff --git a/docs/xsl/docbook/common/ChangeLog b/docs/xsl/docbook/common/ChangeLog new file mode 100755 index 00000000..d9bb6cb2 --- /dev/null +++ b/docs/xsl/docbook/common/ChangeLog @@ -0,0 +1,472 @@ +2003-01-23 Adam Di Carlo + + * Makefile: make use of cvstools/Makefile.incl + +2003-01-20 Norman Walsh + + * gentext.xsl: Added object.titleabbrev.markup for consistency + + * gentext.xsl: Support experimental parameter to specify that number-and-title xrefs should be used even when things are numbered + + * l10n.xsl: Added gentext.template.exists to test if a gentext template exists. Clever name, huh? + + * titles.xsl: Expanded support for obtaining titleabbrevs + +2003-01-10 Norman Walsh + + * .cvsignore, l10n.xml: Added bg.xml + + * Makefile: Add Bulgarian + +2003-01-02 Norman Walsh + + * labels.xsl, titles.xsl: Support setindex (there were all sorts of things wrong with it) + +2003-01-01 Norman Walsh + + * table.xsl: CALS says the default for colsep and rowsep is 1. + + * table.xsl: Fix variable scoping problem + + * titles.xsl: Support titleabbrev (outside of info elements anyway) + +2002-12-18 Robert Stayton + + * common.xsl: The select.mediaobject.index template now uses the + $stylesheet.result.type parameter to choose the role + value, with xhtml falling back to html if needed. + +2002-12-17 Robert Stayton + + * common.xsl: Changed selection of mediaobject to be more consistent using + a separate select.mediaobject.index template. Also added + text-align to block containing external-graphic in fo output. + +2002-11-23 Robert Stayton + + * common.xsl: Fixed bug in orderedlist-starting-number test when + @continuation not set. + +2002-11-14 Norman Walsh + + * common.xsl: Handle nested refsections in section.level + + * gentext.xsl: Pass full xpath name to gentext.template instead of just the local-name + + * l10n.xsl: Make gentext.template search through /-separated names + +2002-10-19 Norman Walsh + + * l10n.xsl: Support output of language attribute + +2002-10-09 Norman Walsh + + * l10n.xsl: Make 3166 language codes work in upper or lowercase + +2002-10-02 Norman Walsh + + * common.xsl: Added orderedlist-starting-number and orderedlist-item-number templates + +2002-10-01 Robert Stayton + + * common.xsl: Changed the section.level template to return a number that matches + the section level (sect1 = 1, etc.). + +2002-09-27 Norman Walsh + + * l10n.xml: Add Thai + +2002-09-15 Norman Walsh + + * .cvsignore, Makefile, l10n.xml: Added LT and VI localizations + +2002-09-04 Norman Walsh + + * common.xsl: Refactor person.name templates so that it's easy to override them + + * l10n.xsl: Move l10n.* parameters into ../params so they can be properly documented; made l10n.gentext.use.xref.language a numeric boolean parameter instead of a proper boolean + +2002-09-03 Norman Walsh + + * common.xsl: Remove spurious character on line 432 + + * table.xsl: Make sure row-level colsep and rowsep values are 'inherited' onto missing cells + +2002-09-02 Norman Walsh + + * common.xsl: Support person-name style from localization data in personal names + +2002-08-28 Norman Walsh + + * table.xsl: Make inherited attributes work for 'missing' table cells + +2002-07-29 Robert Stayton + + * targetdatabase.dtd: Changed the targetptr attribute from #REQUIRED to #IMPLIED + since it is not required on all objects. + + * targetdatabase.dtd: Forgot to fix the attribute on the element + as well. + + * targetdatabase.dtd: Replaced targetid attribute on document with targetptr + per the decision of the DocBook Technical Committee. + +2002-07-17 Norman Walsh + + * labels.xsl: Don't count equations without titles when labelling equations + + * labels.xsl: Fixed thinko + +2002-07-13 Robert Stayton + + * targets.xsl: Fixed output encoding to utf-8 so a targets database + can handle mixed languages. + Added omit-xml-declaration to get around the standalone + attribute in the XML declaration not being permitted + in system entities. + +2002-07-09 Norman Walsh + + * labels.xsl: Bug #558333: use containing section for the label of a bridgehead if section.autolabel is non-zero + +2002-07-07 Robert Stayton + + * common.xsl: Changed the name of the second-order itemizedlist mark + from 'round' (not supported in browsers'