Zend Framework Translator - Manual Compilation Instructions
Introduction
The manual is written in Docbook XML and requires a Unix-like operating system with the standard GNU toolchain and xsltproc or a similar XSLT processor to build the source XML into the HTML that is shipped with the Zend Framework distributions.
On Windows, you can compile the docbook using Cygwin. See: http://www.cygwin.com
Linting the Manual / Checking for Errors
If you have an existing checkout of the ZF SVN, then update your Makefile:
For all of the methods below, any errors reported are relative to a temporary file (not the original source file you edit). The temporary file name begins with "_temp".
Checking a single file you just edited
Checking the entire manual
Also, you can now manually xmllint the entire manual via:
.. or simply use:
Installation for Windows users
Installation steps for Cygwin:
- Choose "Install from Internet", click [Next]
- Choose the directory where you want to install Cygwin. Leave the other options on their "RECOMMENDED" selection. Click [Next]
- Select a directory where you want downloaded files to be stored. Click [Next]
- Select your way of connecting to the Internet. Click [Next]
- Choose the most suitable mirror in the mirrorlist. Click [Next]
- Select the following packages to install:
- Devel > automake1.9
- Devel > make
- Libs > libxslt
All dependent packages will automatically be selected for you. Click [Next]
- Sit back and relax while Cygwin and the selected packages are being downloaded and installed. This may take a while.
- Check the option "Create icon on Desktop" and "Add icon to Start Menu" to your liking. Click [Finish].
Building the manual (*nix AND Cygwin)
Below are instructions for building the documentation into HTML.
NOTE: You don't necessarily need the whole distribution of source files for Zend Framework. All you need is the language directory you want to build, for example <ZF_HOME>/documentation/manual/ru/ and you also need one sister directory <ZF_HOME>/documentation/manual/.build/. The latter directory contains a shell script that is needed during the manual build process. Note that you will have to create the .build directory yourself and also the mkentities.sh file.
- Go to a shell prompt, or Windows users will run Cygwin (you can double-click the icon on the Desktop or in the Start menu if you've chosen any of these options at install-time)
- Navigate to the directory where the documentation files are stored using the traditional Unix commands. For Cygwin users, drives are stored under "/cygdrive". So if your documentation files are stored under "c:\ZF\documentation", you'll need to run the command "cd /cygdrive/c/ZF/documentation/".
You're under a Unix environment, so don't forget all paths are case sensitive! - To compile the doc, go to the directory in which manual.xml is located (e.g. documentation/manual/en), and run:
$ autoconf
$ ./configure
$ mkdir ../.build
$ touch ../.build/mkentities.sh
$ chmod +x ../.build/mkentities.sh
$ make - Now run the command below to see a list of errors (if any) in the XML:
xmllint --valid --noout manual.xml
Rebuilding the manual
If you have made changes to the documentation and need to rebuild the HTML pages, navigate a shell to the documentation tree that you wish to rebuild, and type the following commands:
$ make clean
$ make
Troubleshooting
If you're encountering errors while trying the build instructions above...
- Remove all files from the html/ subdir except dbstyle.css
- Remove all files from the root dir except manual.xml, configure.in, Makefile.in and README. The important one here is entities.ent.
- You can optionally remove the "/autom4te.cache" and the "/build/docbook-xsl" directory
- Try to build again following the instructions given above. If it still throws errors, post a message to the fw-docs@lists.zend.com list.
3 Comments
comments.show.hideJun 23, 2006
Gavin
Q: When I compile the doc, I have this error message:
manual.xml:47: parser error: Entity 'module_specs.Zend_Db_Profiler' not defined....
A: Delete the file: 'entities.ent'
Aug 28, 2006
Art Hundiak
From a fresh cygwin install I get:
$ make
/usr/bin/xsltproc --output html/index.html ./build/html.xsl manual.xml
error : Operation in progress
manual.xml:7: warning: failed to load external entity "http://www.oasis-open.org
/docbook/xml/4.4/docbookx.dtd"
]>
^
ref/copyrights.xml:9: parser error : Entity 'copy' not defined
Copyright © 2005-<?dbtimestamp format="Y"?> Zend Technologies Inc.
... blah blah blah ...
^
My machine is behind a firewall and needs a proxy server to connect to the internet. I'm assuming the problem is that xsltproc cannot get to docbookx.dtd. Is there an easy way to resolve this problem?
Apr 07, 2010
Bruno Pirajá Moyle
In a linux environment, I suggest running the make process with the lowest priority as possible:
$ nice -19 make
(The first nice argument is a integer defining the nice value for the process, higher values means lower priority)
Even with this, a 4GB and Dual Core desktop can have 90% of memory usage while compiling.