goba Sun Oct 21 08:26:52 2001 EDT Modified files: /phpdoc/howto howto.ent howto.html.tar.gz howto.xml Log: Many typo fixes, and corrections. Major ones: - removing global.ent dependencies, now howto is free from any changes in global.ent - adding README.xsl to "tools" and "generating" sections - adding more information for Windows users - adding DocBook DTD version notes - adding CVS add and remove documentation
Index: phpdoc/howto/howto.ent diff -u phpdoc/howto/howto.ent:1.6 phpdoc/howto/howto.ent:1.7 --- phpdoc/howto/howto.ent:1.6 Sun Sep 30 08:49:38 2001 +++ phpdoc/howto/howto.ent Sun Oct 21 08:26:51 2001 @@ -13,6 +13,9 @@ <!-- General PHP.net links --> <!ENTITY url.php "http://www.php.net/"> +<!ENTITY url.php.cvs "http://cvs.php.net"> +<!ENTITY url.php.cvsaccount "http://www.php.net/cvs-php.php"> +<!ENTITY url.php.anoncvs "http://www.php.net/anoncvs.php"> <!ENTITY url.php.docs "http://www.php.net/docs.php"> <!ENTITY url.php.docdownload "http://www.php.net/download-docs.php"> <!ENTITY url.php.manual "http://www.php.net/manual/"> @@ -44,12 +47,16 @@ <!ENTITY url.cvs-win "http://ftp.cvshome.org/win32/"> <!ENTITY url.cvstut1 "http://www.arc.unm.edu/~rsahu/cvs.html"> <!ENTITY url.cvstut2 "http://cellworks.washington.edu/pub/docs/cvs/tutorial/cvs_tutorial_1.html"> -<!ENTITY url.cvs.php "http://cvs.php.net"> -<!ENTITY url.cvsaccount.php "http://www.php.net/cvs-php.php"> -<!-- -http://www.php.net/anoncvs.php ---> +<!-- XSL tools and utils links --> +<!ENTITY url.xsl.xt "http://www.jclark.com/xml/xt.html"> +<!ENTITY url.xsl.saxon "http://saxon.sourceforge.net/"> +<!ENTITY url.xsl.xalan "http://xml.apache.org/xalan-j/"> +<!ENTITY url.xsl.style "http://www.nwalsh.com/docbook/xsl/index.html"> +<!ENTITY url.xsl.passivetex "http://users.ox.ac.uk/~rathz/passivetex/"> +<!ENTITY url.xsl.fop "http://xml.apache.org/fop/"> +<!ENTITY url.xsl.xep "http://www.renderx.com/"> +<!ENTITY url.sunjava "http://java.sun.com/"> <!-- For Misc section --> <!ENTITY url.zend.phpfunc "http://www.zend.com/phpfunc/"> Index: phpdoc/howto/howto.html.tar.gz Index: phpdoc/howto/howto.xml diff -u phpdoc/howto/howto.xml:1.12 phpdoc/howto/howto.xml:1.13 --- phpdoc/howto/howto.xml:1.12 Sun Oct 21 06:05:10 2001 +++ phpdoc/howto/howto.xml Sun Oct 21 08:26:52 2001 @@ -1,17 +1,15 @@ <?xml version='1.0' encoding='ISO-8859-1' ?> <!DOCTYPE article PUBLIC "-//Norman Walsh//DTD DocBk XML V3.1.7//EN" "../dbxml/docbookx.dtd" [ -<!ENTITY % phpdoc-howto.entities SYSTEM "./howto.ent"> -<!ENTITY % global.entities SYSTEM "../global.ent"> + <!-- We have our own entities, not dependant on phpdoc global.ent --> + <!ENTITY % phpdoc-howto.entities SYSTEM "./howto.ent"> + %phpdoc-howto.entities; -%phpdoc-howto.entities; -%global.entities; ]> <!-- TODO Files to incorporate: - README.xsl README.translations make_chm.README @@ -211,7 +209,7 @@ The PHP documentation is written in XML using the <link linkend="docbook">DocBook DTD</link>. If you would like to contribute to the PHP documentation work, you need - to at least now the very basics of XML and DocBook. + to at least know the very basics of XML and DocBook. </para> <para> @@ -241,7 +239,7 @@ <!-- New Section: Tools Setup - - - - - - - - - - - - - - - - - - - --> <sect1 id="tools-setup"> - <title>Tools and setup instructions</title> + <title>Tools and Setup Instructions</title> <para> What tools you need depends on the operating system you use. @@ -312,9 +310,8 @@ <para> You will also need <ulink url="&url.autoconf;">autoconf</ulink> to - build the <emphasis>phpdoc</emphasis> GNU configure script. Many - distributions come with autoconf already installed. The latest - copy can be found at: + build the phpdoc GNU configure script. Many distributions come + with autoconf already installed. The latest copy can be found at: <itemizedlist> <listitem> <simpara><ulink url="&url.autoconf.ftp;">&url.autoconf.ftp;</ulink></simpara> @@ -334,10 +331,10 @@ </para> <para> - These tools are all seperate packages and can be downloaded and + These tools are all separate packages and can be downloaded and installed directly from the author's websites if you choose to do so. You do not have to use these source RPMs, but installing from - the author's seperate packages is out of the scope of this HOWTO. + the author's separate packages is out of the scope of this HOWTO. </para> <para> @@ -375,8 +372,20 @@ <para> These packages are updated from time to time. Please make sure - you download the latest version available from the above sites. + you download the latest version available from the above sites + (the actual file names may change, so if you find newer files + than mentioned above, please report, and we can update this list). </para> + + <note> + <para> + We currently use DocBook 3.1.7 (not the latest version) for + writing phpdoc files. This is because there are + incompatibilities between DocBook 3.x and 4.x currently not + corrected in the documentation. Probably we will update + the XML files, and move to DocBook 4.1.2 soon. + </para> + </note> </sect3> @@ -440,8 +449,9 @@ line client here at the <ulink url="&url.cvs-win;">CVSHome.org</ulink> Win32 download pool. We do not recommend GUI tools such as WinCVS, because they can easily screw up the repository - with files not intended to be there. The best is to use - one command line client. + with files not intended to be there (eg. files with + uppercased names). The best is to use one command line + client, as this way you are in control. </para> <para> @@ -492,9 +502,10 @@ <para> You need to download and install the Cygwin tools. Just select the "Install now!" link and run the supplied - setup.exe. It will guide you through process of installation. - These tools are port of standard unix tools like sed, awk, - autoconf, make, perl, ... for Windows. + <filename>setup.exe</filename>. It will guide you through + process of installation. These tools are port of standard + Unix tools like sed, awk, autoconf, make, perl, ... + for Windows. </para> <para> @@ -517,8 +528,9 @@ <para> Change to the dir where your phpdoc snapshot is (or where you - want to have it). Use, just like windows, the <literal>cd</literal> command. - In Cygwin, the <literal>dir</literal> command is also supported. + want to have it). Use, just like in Windows, the + <literal>cd</literal> command. In Cygwin, the + <literal>dir</literal> command is also supported. </para> <para> @@ -533,8 +545,9 @@ steps, you'll probably need to modify <filename>phpdoc/configure.in</filename> manually. We do not give any support if you are self-opinionated :) - Currently you can specify the DSSSL location manually - by using the <literal>--with-dsssl=C:/path/to/dsssl</literal> + In this situation you can specify the DSSSL location + manually by using the + <literal>--with-dsssl=C:/path/to/dsssl</literal> option with configure. </simpara> </note> @@ -551,14 +564,15 @@ <itemizedlist> <listitem><simpara>Jade to <literal>phpdoc-tools/jade</literal></simpara></listitem> - <listitem><simpara>Norman Welsh' DSSSL's to <literal>phpdoc-tools/dsssl/docbook</literal></simpara></listitem> + <listitem><simpara>Norman Walsh's DSSSL files to +<literal>phpdoc-tools/dsssl/docbook</literal></simpara></listitem> <listitem><simpara>the ISO-entities to <literal>phpdoc-tools/iso-entities</literal></simpara></listitem> </itemizedlist> XSL stylesheets are <emphasis>not necessary</emphasis> - to generate the html versions of the manual. If you think - you would like to test them, than unzip Norman Walsh's - XSL's to <literal>phpdoc-tools/xsl/docbook</literal>. See + to generate the html versions of the manual, the DSSSL style + sheets are used by default. If you think you would like + to test XSL ones, than unzip Norman Walsh's + XSL files to <literal>phpdoc-tools/xsl/docbook</literal>. See <ulink url="&url.nwalsh.xsl;">&url.nwalsh.xsl;</ulink> for more information and downloadable files. </para> @@ -600,11 +614,12 @@ ./configure --with-lang=your_language_code </programlisting> </informalexample> - Substitute <literal>your_language_code</literal> with - a language code you checked out the files of, - and would like to work on. The - <literal>--with-lang</literal> parameter is - optional. If you don't specify it, the default is en. + Substitute <literal>your_language_code</literal> with + a language code you checked out the files of, + and would like to work on. The + <literal>--with-lang</literal> parameter is + optional. If you don't specify it, the default is + <literal>en</literal> (English). </para> <para> @@ -616,6 +631,89 @@ </sect3> </sect2> + + <sect2 id="tools-for-xsl"> + <title>Tools for XSL Stylesheets</title> + + <para> + In order to successfully use the XSL stylesheets + you must have some XSLT processor and the XSL + DocBook Stylesheets. This is sufficient for + generating HTML version of the documentation. + If you also want to create a version suitable + for printing, you will additionally need a + FO processor. + </para> + + <para> + This is an operating system independent section, + as most of the tools are written in the Java + language, or provide a version in Java. This means, + you can run them on virtually any operating system, + where a Java Virtual Machine is available. See the + <ulink url="&url.sunjava;">Java homepage</ulink> + for more information. + </para> + + <note> + <para> + Using XSL stylesheets to generate different formats + of the <literal>phpdoc</literal> XML files is + <emphasis>optional</emphasis> currently. This method + is not as well supported as DSSSL stylesheets, + but is a promising technology. You do not need + to setup any tools mentioned here if you would + not like to play with XSL stylesheets. + </para> + </note> + + <para> + XSLT processors: + <itemizedlist> + <listitem> + <simpara> + XT: <ulink url="&url.xsl.xt;">&url.xsl.xt;</ulink> + </simpara> + </listitem> + <listitem> + <simpara> + Saxon: <ulink url="&url.xsl.saxon;">&url.xsl.saxon;</ulink> + </simpara> + </listitem> + <listitem> + <simpara> + Xalan: <ulink url="&url.xsl.xalan;">&url.xsl.xalan;</ulink> + </simpara> + </listitem> + </itemizedlist> + </para> + + <para> + XSL DocBook Stylesheets: <ulink url="&url.xsl.style;">&url.xsl.style;</ulink> + </para> + + <para> + FO processors: + <itemizedlist> + <listitem> + <simpara> + PassiveTeX: <ulink url="&url.xsl.passivetex;">&url.xsl.passivetex;</ulink> + </simpara> + </listitem> + <listitem> + <simpara> + FOP: <ulink url="&url.xsl.fop;">&url.xsl.fop;</ulink> + </simpara> + </listitem> + <listitem> + <simpara> + XEP: <ulink url="&url.xsl.xep;">&url.xsl.xep;</ulink> + </simpara> + </listitem> + </itemizedlist> + </para> + + </sect2> </sect1> <!-- New Section: File Overview - - - - - - - - - - - - - - - - - - --> @@ -645,7 +743,7 @@ <simpara> Contains entity definitions for all chapters and appendices. Entities for the XML files are generated - by configure, so there is no need to edit the file. + by configure, so <emphasis>you should not edit this file</emphasis>. </simpara> </listitem> </varlistentry> @@ -665,8 +763,8 @@ <simpara> Contains local entities used by this language. Some common ones are the main part titles, but - you should also put entities used only in this - language here. + you should also put entities used only by this + language's files here. </simpara> </listitem> </varlistentry> @@ -675,7 +773,7 @@ <listitem> <simpara> Longer often used XML snippets translated to this - language. Including warnings, notes, etc. + language. Including common warnings, notes, etc. </simpara> </listitem> </varlistentry> @@ -717,7 +815,7 @@ modified by you, because all modifications generate a diff posted to the phpdoc mailing list, and the history is also viewable with a CVS client or the web interface at - <ulink url="&url.cvs.php;">&url.cvs.php;</ulink>. You can + <ulink url="&url.php.cvs;">&url.php.cvs;</ulink>. You can also delete a file or add one with your CVS client, if you see it is needed. </para> @@ -753,9 +851,13 @@ <para> First, before you can actually make documentation changes, you - need write access to the <ulink url="&url.cvs.php;">cvs.php.net</ulink> + need write access to the <ulink url="&url.php.cvs;">cvs.php.net</ulink> CVS repository. You can always checkout a module anonymously, but you can not commit changes unless you have an account. + If you only would like to check files out, you can use + the read only user name and password. See + <ulink url="&url.php.anoncvs;">&url.php.anoncvs;</ulink> + for more information. </para> <para> @@ -787,7 +889,7 @@ <simpara> Once someone from the development team responds to your e-mail, you will need to go to <ulink - url="&url.cvsaccount.php;">&url.cvsaccount.php;</ulink> and fill + url="&url.php.cvsaccount;">&url.php.cvsaccount;</ulink> and fill out the formal request form. </simpara> </listitem> @@ -798,7 +900,7 @@ <para> Both of the above steps and other information about CVS accounts at cvs.php.net can be found on the same page as the request form, - <ulink url="&url.cvsaccount.php;">&url.cvsaccount.php;</ulink>. + <ulink url="&url.php.cvsaccount;">&url.php.cvsaccount;</ulink>. Note that this it not an automated process. If you receive no reponse after days, do not hesitate to post your request again. </para> @@ -810,7 +912,7 @@ <para> Now that you have write access to the CVS repository, let's setup a few variables in your <filename>.cvsrc</filename> file, add a - <literal remap="tt">CVSROOT</literal> environment variable and + <literal>CVSROOT</literal> environment variable and login to the CVS repository. </para> @@ -818,7 +920,8 @@ If you don't already have a <filename>.cvsrc</filename> file in your home directory, create one now and add the following lines to it. Note that if you use Cygwin, your home directory opens - first, when running the Bash shell. + first, when running the bash shell (it is the home/username + directory under your cygwin install directory). <informalexample> <programlisting> cvs -z3 @@ -842,7 +945,7 @@ <para> Instead of telling <command>cvs</command> where the repository is each time, you can set a default CVS repository in your <literal - remap="tt">CVSROOT</literal> environment variable. + >CVSROOT</literal> environment variable. </para> <para> @@ -870,7 +973,7 @@ <note> <para> - The <literal remap="tt">CVSROOT</literal> environment variable + The <literal>CVSROOT</literal> environment variable won't be set until the next time you log in. </para> </note> @@ -878,7 +981,9 @@ <para> If you use Windows, use your regular way to add the new environment variable, according to the Windows version - you are using. + you are using (use the <command>set</command> command + on Windows 9x, or the Dialog box for setting environment + variables on Windows 2000). </para> <para> @@ -907,7 +1012,8 @@ you successfully login to the CVS respository, your encrypted password is stored in the <filename>.cvspass</filename> file in your home directory. You won't need to log back into the - same repository again unless you delete that file. + same repository again unless you delete that file (or + issue a <literal>cvs logout</literal>). </para> </sect2> @@ -940,6 +1046,17 @@ module. </para> + <note> + <para> + You are not completely free to decide where this + <filename>phpdoc</filename> directory should be. See the + <link linkend="tools-setup">Tools and Setup Instructions</link> + section for more precise information about whether the + place of this <filename>phpdoc</filename> directory + is restricted on your system or not. + </para> + </note> + </sect2> <sect2 id="update"> @@ -1041,13 +1158,14 @@ <title>Commiting Changes</title> <para> - Once you have made changes to a file and validated your XML, you - are ready to commit the change to the CVS repository. + Once you have made changes to a file and <emphasis>validated + your XML</emphasis>, you are ready to commit the changes + to the CVS repository. </para> <para> When commiting a file or files to the repository, it is polite to - supply an brief message of what you have changed. You do not need + supply a brief message of what you have changed. You do not need to document every single line you changed, that is part of CVS' job. However, it is helpful to see a brief summary of what has changed from version to version without having to study the file @@ -1072,6 +1190,73 @@ using <parameter>-m</parameter>, choose this way. </para> </sect2> + + <sect2 id="add"> + <title>Adding files</title> + + <para> + It is sometimes needed to add files to the English files + (eg. adding a new appendix), and it is initial for + translations (adding translated files). To add a file + you need to put that file to the proper place, where + you want it to be. + </para> + + <para> + To add a file, issue the following command: + <informalexample> + <programlisting> +$ cvs add <parameter>file1</parameter> +<optional><parameter>file2</parameter></optional> + </programlisting> + </informalexample> + </para> + + <para> + This only shedules the file for addition. To + complete the addition of the file(s), you need + to do a commit, as described above. + </para> + + <warning> + <para> + Before adding new files, you should choose the new + file name carefully. There are some limitations to + file names, because the automatic file name -> + entity name conversion. + </para> + </warning> + </sect2> + + <sect2 id="remove"> + <title>Removing files</title> + + <para> + It is sometimes needed to remove files from the + repository. CVS stores the whole history of the + files, so deleting is not an irreversible step. + Please be careful when deleting files though. + A file may be needed for the build process, or + can store important information for other people. + </para> + + <para> + To remove a file, first remove the file from your + local copy of the CVS repository, and issue the + following command: + <informalexample> + <programlisting> +$ cvs remove <parameter>file1</parameter> +<optional><parameter>file2</parameter></optional> + </programlisting> + </informalexample> + </para> + + <para> + This only shedules the file for removing. To + complete the removing of the file(s), you need + to do a commit, as described above. + </para> + + </sect2> </sect1> <!-- New Section: Generating the docs - - - - - - - - - - - - - - - --> @@ -1108,7 +1293,7 @@ <para> Note that if you are using Windows, these commands - only work in the Cygwin Bash shell. + only work in the Cygwin bash shell. </para> </sect2> @@ -1156,7 +1341,8 @@ </para> <para> In the above example output, the parser expected to see an end tag - for <para> at line 54 in the file en/functions/strings.xml. + for <para> at line 54 in the file + <filename>en/functions/strings.xml</filename>. Using this information, you can go back to the file and correct the mistake before committing your changes. </para> @@ -1202,8 +1388,8 @@ </listitem> <listitem> <para> - <literal>rtf</literal>, a RTF (Rich Text Format) version of the manual found at - <ulink url="&url.php.manual.rtf;">&url.php.manual.rtf;</ulink> + <literal>rtf</literal>, a RTF (Rich Text Format) version of the manual, + currently not available online </para> </listitem> <listitem> @@ -1235,7 +1421,7 @@ </programlisting> </informalexample> The plain text version of the PHP documentation is made - by filtering the bightml output through lynx. + by filtering the <literal>bightml</literal> output through lynx. </para> <note> @@ -1249,10 +1435,10 @@ <para> Where the output files are placed depends on the format you built. HTML manuals generate in the <filename>html</filename> - subdirectory of phpdoc, similarly the <literal>make phpweb</literal> - command will place the files into the <filename>php</filename> - directory. The place for the HOWTO HTML files is - <filename>howto/html</filename>. + subdirectory of <literal>phpdoc</literal>, similarly the + <literal>make phpweb</literal> command will place the files + in the <filename>php</filename> directory. The place for + the HOWTO HTML files is <filename>howto/html</filename>. </para> <para> @@ -1261,6 +1447,94 @@ </para> </sect2> + + <sect2 id="using-xsl-stylesheets"> + <title>Using XSL Stylesheets</title> + + <para> + Currently using XSL stylesheets to generate output + of XML files is not as well supported as using DSSSL + style sheets. This is because XSL stylesheets are not + as customized as DSSL ones, and XSL tools are not as + widely used, and standardized. + </para> + + <para> + At this time there are no XSL specific targets in + <filename>Makefile</filename>. This is because there + are not standardized ways to invoke XSLT processors. + To use XSL stylesheets you must run the + <filename>configure</filename> script and tell it, + where your copy of XSL DocBook Stylesheets is placed. + The majority of XSLT processors require an URL instead + of a filename, so be sure to prepend + the <literal>file:///</literal> schema before path: + <informalexample> + <programlisting> +$ autoconf +$ ./configure --with-xsl=file:///path/to/docbook/xsl/styles + </programlisting> + </informalexample> + </para> + + <para> + Configure will create four files: + <filename>html.xsl</filename>, + <filename>bightml.xsl</filename>, + <filename>htmlhelp.xsl</filename>, + <filename>print.xsl</filename> among others. These files + can be used to generate the desired output. + <filename>html.xsl</filename> generates a set of small + HTML files, <filename>bightml.xsl</filename> generates + one large HTML file, <filename>htmlhelp.xsl</filename> + generates source files processable by HTML Help Workshop + and <filename>print.xsl</filename> generates a file + with FO objects suitable for further processing with + some FO processor. + </para> + + <para> + Invocation of XSLT processor is processor dependent, + for now suppose that you have a shell script called + <filename>saxon</filename> which is able to invoke the + Saxon processor. Some examples: + <informalexample> + <programlisting> +$ mkdir html +$ saxon manual.xml html.xsl +$ saxon manual.xml htmlhelp.xsl +$ saxon -o bigmanual.html manual.xml bightml.xsl +$ saxon -o manual.fo manual.xml print.xsl + </programlisting> + </informalexample> + Use the appropriate command from the examples above + to generate the desired output as described above. + If you would like to generate HTML Help output, you + must run the Microsoft HTML Help Compiler after + processing. To get a PDF from the FO file, you must + run some FO processor on the + <filename>manual.fo</filename> file. + </para> + + <note> + <para> + Generating <filename>bigmanual.html</filename> with Saxon + (using JDK 1.3) takes about two minutes on a Celeron 400 + computer. Generating FO files takes about two times more + + plus time required to run the FO processor. Generating + chunked version or HTML Help version of manual takes about + 60 minutes. + </para> + </note> + + <note> + <para> + Not all customization from DSSSL are backported to XSL, + so some things are not as pretty as in DSSSL output + <emphasis>currently</emphasis>. + </para> + </note> + </sect2> </sect1> <!-- New Section: Docbook - - - - - - - - - - - - - - - - - - - - - --> @@ -1282,6 +1556,12 @@ We use DocBook, because it eases the generation of the several formats of the documentation, and acts as a central "meta format" for all the things we would like to express in the documentation. + </para> + <para> + You cannot just invent tags in DocBook. There is a standard + set of tags you can use. If you are working on a translation, + plase do not translate tags, as they need to stay as they + was written in the English files to work properly. </para> </sect2>