Browse Source

add: xml files with the fop documentation (mirrors files from xml-site) and an ant script to write all into one pdf file


git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@193436 13f79535-47bb-0310-9956-ffa450edef68
tags/pre-columns
fotis 24 years ago
parent
commit
b15d38da94

+ 76
- 0
docs/xml-docs/build.xml View File

@@ -0,0 +1,76 @@
<?xml version="1.0"?>

<!-- ===========================================================================


Build targets
=============

These are the meaningful targets for this build file:

- pdf [default] -> creates ./fop.pdf
- clean -> deletes all files produced by this script

-->


<project default="pdf" basedir=".">

<!-- =================================================================== -->
<!-- Initialization target -->
<!-- =================================================================== -->
<target name="init">
<tstamp/>

<property name="src.dir" value="./fop"/>
<property name="docfile.pdf" value="./fop.pdf"/>
<property name="allfiles.xml" value="fop-doc.xml"/>
<property name="stylesheet.xsl" value="xml2pdf.xsl"/>
<property name="outfile.fo" value="fop-doc.fo"/>
<property name="outfile.pdf" value="fop-doc.pdf"/>

<property name="xslt" value="org.apache.xalan.xslt.Process"/>

<taskdef name="fop" classname="Fop"/>
<taskdef name="collectDocFiles" classname="CollectDocFiles"/>
<taskdef name="xslt" classname="Xslt"/>

</target>

<!-- =================================================================== -->
<!-- compiles all xml files into one and removes the proprietary sbk protocol -->
<!-- =================================================================== -->
<target name="prepare-files" depends="init">
<collectDocFiles configFile="Fop.xml" outFile="fop.pdf"/>
</target>

<!-- =================================================================== -->
<!-- Generates the fo file -->
<!-- =================================================================== -->
<target name="fo" depends="prepare-files">
<xslt infile="${allfiles.xml}" xsltfile="${stylesheet.xsl}"
outfile="${outfile.fo}" smart="yes"/>
</target>


<!-- =================================================================== -->
<!-- Generates the pdf file -->
<!-- =================================================================== -->
<target name="pdf" depends="fo">
<fop fofile="${outfile.fo}" pdffile="${outfile.pdf}"/>
</target>



<!-- =================================================================== -->
<!-- Clean targets -->
<!-- =================================================================== -->
<target name="clean">
<delete file="${allfiles.xml}"/>
<delete file="${outfile.fo}"/>
<delete file="${outfile.pdf}"/>
</target>

</project>

<!-- End of file -->

+ 26
- 0
docs/xml-docs/fop.xml View File

@@ -0,0 +1,26 @@
<?xml version="1.0"?>


<book title="FOP XSL-FO documentation" copyright="1999 The Apache Software Foundation">
<external href="../index.html" label="Home"/>
<separator/>
<document id="index" label="Readme" source="fop/readme.xml"/>
<document id="download" label="Download" source="fop/download.xml" />
<document id="running" label="Running FOP" source="fop/running.xml" />
<document id="implemented" label="Features" source="fop/implemented.xml" />
<document id="limitations" label="Limitations" source="fop/limitations.xml" />
<document id="bugs" label="Bugs" source="fop/bugs.xml" />
<document id="examples" label="Examples" source="fop/examples.xml" />
<separator/>
<document id="compiling" label="Compiling" source="fop/compiling.xml" />
<document id="embedding" label="Embedding" source="fop/embedding.xml" />
<document id="involved" label="Getting involved" source="fop/involved.xml" />
<document id="architecture" label="Architecture" source="fop/architecture.xml"/>
<separator/>
<group id="faqs" label="FAQs" >
<entry id="faq-running" source="fop/faq.xml" />
</group>
<document id="specs" label="Specifications" source="fop/specs.xml" />
<document id="license" label="License" source="fop/license.xml" />

</book>

+ 257
- 0
docs/xml-docs/fop/architecture.xml View File

@@ -0,0 +1,257 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE s1 SYSTEM "sbk:/style/dtd/document.dtd">
<!-- by Arved Sandstrom -->

<s1 title="FOP Mechanics">

<s2 title="Introduction">

<p>
The overall process is controlled by <em>org.apache.fop.apps.Driver</em>. In
this class, a typical sequence is:</p>

<p><code>Driver driver = new Driver();</code></p>
<p><code>driver.setRenderer("org.apache.fop.render.pdf.PDFRenderer", version);</code></p>
<p><code>driver.addElementMapping("org.apache.fop.fo.StandardElementMapping");</code></p>
<p><code>driver.addElementMapping("org.apache.fop.svg.SVGElementMapping");</code></p>
<p><code>driver.setWriter(new PrintWriter(new FileWriter(args[1])));</code></p>
<p></p>
<p><code>driver.buildFOTree(parser, fileInputSource(args[0]));</code></p>
<p></p>
<p><code>driver.format();</code></p>
<p></p>
<p><code>driver.render();</code></p>
</s2>

<s2 title="Formatting Object Tree">
<p>The class <em>org.apache.fop.fo.FOTreeBuilder</em> is responsible for actually
constructing the FO tree. The key SAX events used are </p>
<p><code>startElement()</code>,</p>
<p><code>endElement()</code> and <code>characters()</code>.</p>

<p>All formatting objects derive from abstract class
<em>org.apache.fop.fo.FONode</em>. The other FO classes inherit from
<em>FONode</em> as follows:</p>

<p><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;FONode</code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|</code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;__________|________</code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|</code></p>
<p><code>&nbsp;&nbsp;&nbsp;FObj&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;FOText</code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;|</code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;|___________________</code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|</code></p>
<p><code>&nbsp;&nbsp;FObjMixed&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SequenceSpecifier
</code></p>

<p>FO's extending FObj:</p>

<p>Package org.apache.fop.fo.pagination:</p>


<p><code> LayoutMasterSet</code></p>
<p><code> PageSequence</code></p>
<p><code> RegionAfter</code></p>
<p><code> RegionBefore</code></p>
<p><code> RegionBody</code></p>
<p><code> Root</code></p>
<p><code> SequenceSpecification</code></p>
<p><code> SimplePageMaster</code></p>


<p>Package org.apache.fop.fo.flow:</p>


<p><code>BlockContainer</code></p>
<p><code>DisplayGraphic</code></p>
<p><code>DisplayRule</code></p>
<p><code>DisplaySequence</code></p>
<p><code>Flow</code></p>
<p><code>InlineGraphic</code></p>
<p><code>ListBlock</code></p>
<p><code>ListItem</code></p>
<p><code>ListItemBody</code></p>
<p><code>ListItemLabel</code></p>
<p><code>PageNumber</code></p>
<p><code>StaticContent</code></p>
<p><code>Table</code></p>
<p><code>TableBody</code></p>
<p><code>TableCell</code></p>
<p><code>TableColumn</code></p>
<p><code>TableRow</code></p>

<p>FO's extending SequenceSpecifier:</p>

<p>Package org.apache.fop.fo.pagination:</p>


<p><code>SequenceSpecifierAlternating</code></p>
<p><code>SequenceSpecifierRepeating</code></p>
<p><code>SequenceSpecifierSingle</code></p>

<p>FO's extending FObjMixed:</p>

<p>Package org.apache.fop.fo.flow:</p>


<p><code>Block</code></p>
<p><code>InlineSequence</code></p>
<p><code>SimpleLink</code></p>

</s2>

<s2 title="FONode">
<p>
The class inheritance described above only describes the nature of the
content. Every FO in FOP also has a parent, and a Vector of children. The
parent attribute (in the Java sense), in particular, is used to enforce
constraints required by the FO hierarchy.
</p>

<p>
FONode, among other things, ensures that FO's have a parent, that they
have children, that they maintain a marker of where the layout was up to
(for FObj's it is the child number, and for FOText's it is the character
number), and that they have a <code>layout()</code> method.
</p>
</s2>

<s2 title="Making FO's">

<p>
Every FO class has code that looks something like this:
</p>

<p><code>public static class Maker extends FObj.Maker {</code></p>
<p><code>&nbsp;&nbsp; public FObj make(FObj parent, PropertyList propertyList)</code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp; throws FOPException</code></p>
<p><code>&nbsp;&nbsp; {</code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp; return new SimplePageMaster(parent, propertyList);</code></p>
<p><code>&nbsp;&nbsp; }</code></p>
<p><code>}</code></p>


<p>
The class also has a static method that resembles
</p>

<p><code>public static FObj.Maker maker()</code></p>
<p><code>&nbsp;&nbsp; {</code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp; return new PageSequence.Maker();</code></p>
<p><code>&nbsp;&nbsp; }</code></p>

<p>
A hash 'fobjTable' exists in <em>FOTreeBuilder</em>, and maps the FO names (such as
'fo:table') to object references to the appropriate factories
(such as <em>Table.Maker</em>).
</p>

<p>
Properties (recall that FO's have properties, areas have traits, and XML
nodes have attributes) are also a concern of <em>FOTreeBuilder</em>. It
accomplishes this by using <em>PropertyListBuilder</em>, which contains a hash of
property names and <ref>their</ref> respective makers. The base class for
properties is <em>Property</em>, and the property makers extend
<em>Property.Maker</em>.
</p>
</s2>
<s2 title="FO Formatting">

<p>
<em>FOTreeBuilder</em> calls <code>format()</code> on the root FO, passing
it the <em>AreaTree</em>
reference. In turn, <em>Root</em> calls <code>format()</code> on each
<em>PageSequence</em>, passing <ref>it</ref>
the <em>AreaTree</em> reference.
</p>

<p>
The <em>PageSequence</em> <code>format()</code> method does the following things:
</p>

<ol>
<li>Makes a <em>Page</em>, using <em>PageMasterFactory</em> to produce a
<em>PageMaster</em>, and
using <code>makePage()</code> in the latter class. In the simplest picture,
a <em>Page</em> has
5 areas represented by <em>AreaContainers</em>;</li>

<li>Handles layout for <em>StaticContent</em> objects in the 'before' and 'after'
regions, if set. This uses the <code>layout()</code> method in
<em>StaticContent</em>;</li>

<li>If a page break is not forced, it will continue to layout the flow into
the body area (<em>AreaContainer</em>) of the current page;</li>

<li>It continues with (1) when layout into the current page is done, but
the flow is not empty.</li>
</ol>
</s2>

<s2 title="Area Layout">

<p>
FO's that represent actual areas, starting with <em>Flow</em> and
<em>StaticContent</em>, have
a <code>layout()</code> method, with the following signature:
</p>

<p>
<code>
public Status layout(Area area)
</code>
</p>

<p>
The fundamental role of the <code>layout()</code> method is to manage the layout of
children and/or to generate new areas.
</p>

<p>
<em>Example</em>: the <code>layout()</code> method for <em>Flow</em> generates no new areas - it manages the
layout of the flow children.
</p>

<p>
<em>Example</em>: the <code>layout()</code> method for <em>Block</em>
generates a new <em>BlockArea</em> in and of
itself, and also manages the layout of the block children, which are added
to the <em>BlockArea</em> before that is itself added to its parent
<em>Area</em>.
</p>

<p>
<code>Layout()</code> methods are subject to the general constraint that possibly not
all of their children can be accommodated, and they report back accordingly
with an appropriate <em>Status</em>.
</p>
</s2>

<s2 title="Rendering">

<p>
This is a separate process. The <code>render()</code> method in
<em>Driver</em> is invoked (say,
by <em>CommandLine</em>) with the laid-out <em>AreaTree</em> and a
<em>PrintWriter</em> as arguments.
This actually calls the <code>render()</code> method in a specific implementation of
the <em>Renderer</em> interface, typically <em>PDFRenderer</em> or
<em>AWTRenderer</em>.
</p>

<p>
At the highest level <em>PDFRenderer</em>, for example, begins by rendering each
<em>Page</em>. The <code>render()</code> method in <em>Page</em> (as is the case for other areas),
invokes a particular method in the renderer of choice, e.g.
<code>renderPage()</code>.
<em>NOTE</em>: this system is bypassed for <em>Page</em>, incidentally.
</p>

<p>
Rendering will not be discussed further in this document, as most of our
current effort must concentrate on layout. Section 4.12 in the XSL WD
discusses some issues applicable to rendering.
</p>
</s2>

</s1>

+ 20
- 0
docs/xml-docs/fop/bugs.xml View File

@@ -0,0 +1,20 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE s1 SYSTEM "sbk:/style/dtd/document.dtd">


<!-- Bugs -->

<s1 title="Bugs">
<s2 title="How to report bugs">
<p>Please use the bug reporting system <jump href="http://xml.apache.org/bugs/">bugzilla
</jump>, which is part of xml.apache.org.</p>
</s2>
<s2 title="Some bugs">
<p>Colour not continued onto subsequent pages, if coloured block goes over page.
</p>
<p>Each page-sequence begins its page numbering with the number 1 (unless another integer is
specified in the initial-page-number attribute). The W3C recommendations says that
the default (auto) for initial-page-number is: The first page sequence starts with 1. For any further
fo:page-sequence the initial number will be one greater than the last number for that sequence.</p>
</s2>
</s1>

+ 61
- 0
docs/xml-docs/fop/compiling.xml View File

@@ -0,0 +1,61 @@
<?xml version="1.0" standalone="no"?>
<!-- <!DOCTYPE s1 SYSTEM "sbk:/style/dtd/document.dtd"> -->

<!-- Compiling FOP -->

<s1 title="Compiling FOP">
<s2 title="Prerequisites">
<s3 title="Java 1.1.x or later">
<p>If you use Java 1.1.x you must also seperately include the swing classes, which can
be found at the <jump href="http://java.sun.com/products/jfc/#download-swing">
Sun website</jump>. From Java 1.2 on (aka Java 2) they are part of the standard
distribution.
</p>
</s3>
<s3 title="An XML parser">
<p>An XML parser which supports Sax and DOM like
<jump href="http://xml.apache.org/xerces-j/index.html">Xerces-J</jump>.
The parser must be in your classpath</p>
</s3>
<s3 title="The xslt processor Xalan ">
<p>Some of the Java source code in FOP is generated from XML using
XSLT. Xalan must be used to generate this code.</p>
<p>Xalan is an XSL stylesheet processor written in java. At the moment you
can't use any other processor, because the make process makes use of some
proprietary features of Xalan which allow to write output in more
then one document. You can find Xalan also at <jump href="http://xml.apache.org/xalan/overview.html">
xml.apache.org</jump>. You have to use Xalan version 0.19.5 or later.
Xalan.jar must be in your classpath and also the file bsf.jar, which comes with Xalan.</p>
</s3>
<s3 title="Setting of JAVA_HOME">
<p>You have to set the enviroment variable JAVA_HOME. It must point to your local JDK
root directory. This is true, even if you use JDK 1.2 or above, which don't need this
setting. It is used by the compilation software.</p>
</s3>
<s3 title="Settings in your classpath">
<p>If you need PDFOutputHandler (an extension, which calls Fop from the XSLT processor XT) you also
must have xp.jar and xt.jar (both can be found at <jump href="http://www.jclark.com/xml/">http://www.jclark.com/xml/
</jump> in your classpath.
</p>
<p>A CLASSPATH for a complete compilation of Fop could look like this, if all these jar files are in
a directory called jars (example uses windows syntax):
</p>
<p><code>set CLASSPATH=\jars\xp.jar;\jars\xt.jar;\jars\xalan.jar;\jars\xerces.jar;\jars\bsf.jar
</code></p>
</s3>
</s2>
<s2 title="Compiling">
<p>Compilation is started by executing build, either as a batch file on win32 (build.bat) or as a shell script on unix. The compilation uses Ant,
a replacement of make (you can find more information about Ant at
<jump href="http://jakarta.apache.org/ant/">jakarte.apache.org</jump>).
build.xml is the replacement of makefile. Look there for further information. </p>
<p>A help screen is shown by calling "build usage".
</p>
</s2>
<s2 title="Compiling FOP on MacOS">
<!-- contributed by Arved Sandstrom who also manages the webpage the jump points to -->
<p>We strongly recommend the use of Codewarrior Java. You will find
a link to more information in the near future.
</p>
</s2>
</s1>

+ 17
- 0
docs/xml-docs/fop/download.xml View File

@@ -0,0 +1,17 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE s1 SYSTEM "sbk:/style/dtd/document.dtd">

<!-- Download FOP -->

<s1 title="Downloading FOP">
<s2 title="">
<p>You can download the latest release version from the <jump
href="http://xml.apache.org/dist/fop/">distribution directory</jump>. </p>
<p>The file contains also the documentation (including some example fo files) and the source. </p>
<p>To run FOP from the command line, see <jump href="running.html">Running FOP</jump>. If you are
interested in embedding FOP in a Java application of your own, see
<jump href="embedding.html">Embedding FOP</jump>.
</p>
</s2>
</s1>


+ 42
- 0
docs/xml-docs/fop/embedding.xml View File

@@ -0,0 +1,42 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE s1 SYSTEM "sbk:/style/dtd/document.dtd">


<!-- Embedding FOP -->

<s1 title="Embedding FOP ">
<s2 title="">
<p>Instantiate org.apache.fop.apps.Driver. Once this class is
instantiated, methods are called to set the
Renderer to use, the (possibly multiple) ElementMapping(s) to
use and the PrintWriter to use to output the results of the
rendering (where applicable). In the case of the Renderer and
ElementMapping(s), the Driver may be supplied either with the
object itself, or the name of the class, in which case Driver will
instantiate the class itself. The advantage of the latter is it
enables runtime determination of Renderer and ElementMapping(s).
</p>
<p>Once the Driver is set up, the buildFOTree method
is called. Depending on whether DOM or SAX is being used, the
invocation of the method is either buildFOTree(Document) or
buildFOTree(Parser, InputSource) respectively.
</p>
<p>A third possibility may be used to build the FO Tree, namely
calling getDocumentHandler() and firing the SAX events yourself.
</p>
<p>Once the FO Tree is built, the format() and render() methods may be
called in that order.
</p>
<p>Here is an example use of Driver from CommandLine.java:</p>
<p><code>Driver driver = new Driver();</code></p>
<p><code>driver.setRenderer("org.apache.fop.render.pdf.PDFRenderer", version);</code></p>
<p><code>driver.addElementMapping("org.apache.fop.fo.StandardElementMapping");</code></p>
<p><code>driver.addElementMapping("org.apache.fop.svg.SVGElementMapping");</code></p>
<p><code>driver.setWriter(new PrintWriter(new FileWriter(args[1])));</code></p>
<p><code>driver.buildFOTree(parser, fileInputSource(args[0]));</code></p>
<p><code>driver.format();</code></p>
<p><code>driver.render();</code></p>
</s2>
</s1>



+ 30
- 0
docs/xml-docs/fop/examples.xml View File

@@ -0,0 +1,30 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE s1 SYSTEM "sbk:/style/dtd/document.dtd">

<!-- Examples -->

<s1 title="Examples">
<p>Examples for the use of xsl:fo can be found in the Fop distribution in
the subdirectory /docs/examples/fo.
</p>
<p>Please be warned: At the moment FOP only supports the
XSL Working Draft 21 April 1999 and the examples are also following this version.
</p>
<p>At the moment the following files are part of the distribution:</p>
<ul>
<li>normal.fo - a very simple file showing the use of a 2 level of headings, normal text and a header.
</li>
<li>table.fo - a simple table
</li>
<li>list.fo - a simple list
</li>
<li>images.fo - shows how to embed gif and jpg images into the xsl:fo file using inline-graphic.
</li>
<li>border.fo - a not so simple example how to use borders in tables
</li>
<li>extensive.fo - a longer test file containing a lot of different flow objects and properties.
A good candidate to test your bugfix or new Fop code.
</li>
</ul>
</s1>


+ 77
- 0
docs/xml-docs/fop/faq.xml View File

@@ -0,0 +1,77 @@
<?xml version="1.0"?>
<!DOCTYPE faqs SYSTEM "sbk:/style/dtd/faqs.dtd">

<faqs title="FAQ Running FOP">

<faq title="Source files for the formatting properties are missing">
<q>Q: I can't find the source files for the formatting properties. The directories
where they should be are empty. Where can I find them?</q>
<a><p>A: They are generated during the build process. So you should use the build script coming
with Fop at least once to generate these files.
</p>
</a>
</faq>


<faq title="Formatting object xxx doesn't work as expected">
<q>Q: Feature xxx of the XSL Working Draft 27 March 2000 does not work as it should. Why?</q>
<a><p>A: First: Only a small subset of formatting objects and properties is
implemented at the moment. Please have a look at the section "Features",
which lists the supported fo and properties. Second: At the moment only
Working Draft 21 Apr 1999 is supported.
</p>
</a>
</faq>

<faq title="Supporting the latest XSL working draft">
<q>Q: When will the latest version of the XSL working draft be supported?</q>
<a><p>Basic conformance to the latest XSL working draft is scheduled for fall 2000.
</p>
</a>
</faq>

<faq title="Fatal error: Root element must be root">
<q>Q: Running FOP I get the following messages or something similar:
"WARNING: Unknown formatting object http://www.w3.org/XSL/Format/1.0^root"
and then a FATAL Error "Root element must be root, not default FO".</q>
<a>
<p>A: Make sure that you have specified as the namespace for fo the
following string: "http://www.w3.org/1999/XSL/Format". It is analogous
to the xslt namespace "http://www.w3.org/1999/XSL/Transform"
</p>
</a>
</faq>

<faq title="Char '>' inserted into page number">
<q>Q: The char ">" is inserted into the page number display like this
"formatting FOs into areas [1] [2] [3>>>>]". Is this a bug?</q>
<a><p>A: No, a feature. It simply means that on that page an area
overflowed (ie there was not enough room to fit the text in).</p></a>
</faq>

<faq title="Are font properties allowed here">
<q>Q: It looks like FOP must be honoring font properties when it shouldn't be?
Example: According to the dtd coming with the xsl-fo spec inline-sequence
shouldn't have any attributes, but FOP doesn't reject them.
</q>
<a>
<p>A: Font properties are inherited down to individual characters. You can
specify font properties on any formatting object you like and any textual content
will inherit those properties (unless overriden by a closer ancestor).
</p>
<p>The dtd coming with the xsl-fo spec isn't correct in this respect.
</p>
</a>
</faq>

<faq title="Supported fonts">
<q>Q: I need some additional fonts in FOP. How I can set embedding fonts?
</q>
<a>
<p>A: At present, FOP does not support any fonts other than the built-in fonts
Times, Helvetica, Courier, Symbol and ZapfDingbats.
</p>
</a>
</faq>

</faqs>

+ 148
- 0
docs/xml-docs/fop/implemented.xml View File

@@ -0,0 +1,148 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE s1 SYSTEM "sbk:/style/dtd/document.dtd">


<!-- What's Implemented? -->

<s1 title="Features">
<s2 title="What's Implemented?">
<p>The following formatting objects and properties of the xsl-fo
working draft (21 Apr 1999) are implemented. Please have also a look at the
section on <jump href="limitations.html">limitations</jump>
</p>
</s2>
<s2 title="1) Formatting Objects">
<ul>
<li>block </li>
<li>display-graphic</li>
<li>display-rule </li>
<li>display-sequence </li>
<li>flow</li>
<li>inline-graphic</li>
<li>inline-sequence </li>
<li>layout-master-set </li>
<li>list-block </li>
<li>list-item </li>
<li>list-item-body </li>
<li>list-item-label </li>
<li>page-number </li>
<li>page-sequence </li>
<li>region-after </li>
<li>region-before </li>
<li>region-body </li>
<li>root</li>
<li>sequence-specification </li>
<li>sequence-specifier-alternating </li>
<li>sequence-specifier-repeating </li>
<li>sequence-specifier-single </li>
<li>simple-page-master </li>
<li>static-content </li>
<li>table (minimal support)</li>
<li>table-body (minimal support)</li>
<li>table-cell (minimal support)</li>
<li>table-column (minimal support)</li>
<li>table-row (minimal support)</li>
</ul>
</s2>

<s2 title="2) Properties">
<ul>
<li>background-color </li>
<li>border-after-color</li>
<li>border-after-style</li>
<li>border-after-width</li>
<li>border-before-color</li>
<li>border-before-style</li>
<li>border-before-width</li>
<li>border-bottom</li>
<li>border-bottom-color</li>
<li>border-bottom-style</li>
<li>border-bottom-width</li>
<li>border-color (only one value allowed) </li>
<li>border-end-color</li>
<li>border-end-style</li>
<li>border-end-width</li>
<li>border-left</li>
<li>border-left-color</li>
<li>border-left-style</li>
<li>border-left-width</li>
<li>border-right</li>
<li>border-right-color</li>
<li>border-right-style</li>
<li>border-right-width</li>
<li>border-start-color</li>
<li>border-start-style</li>
<li>border-start-width</li>
<li>border-style</li>
<li>border-top</li>
<li>border-top-color</li>
<li>border-top-style</li>
<li>border-top-width</li>
<li>border-width</li>
<li>bottom</li>
<li>break-after </li>
<li>break-before </li>
<li>color </li>
<li>column-width </li>
<li>end-indent </li>
<li>extent </li>
<li>flow-name </li>
<li>font-family </li>
<li>font-size </li>
<li>font-style </li>
<li>font-weight </li>
<li>height</li>
<li>href </li>
<li>id</li>
<li>initial-page-number</li>
<li>keep-with-next</li>
<li>left</li>
<li>line-height </li>
<li>margin-bottom (only on pages and regions) </li>
<li>margin-left (only on pages and regions) </li>
<li>margin-right (only on pages and regions) </li>
<li>margin-top (only on pages and regions) </li>
<li>padding (only one value allowed) </li>
<li>padding-after</li>
<li>padding-before</li>
<li>padding-bottom (only in conjunction with background color) </li>
<li>padding-end</li>
<li>padding-left (only in conjunction with background color) </li>
<li>padding-right (only in conjunction with background color) </li>
<li>padding-start</li>
<li>padding-top (only in conjunction with background color) </li>
<li>page-height </li>
<li>page-master-even </li>
<li>page-master-first </li>
<li>page-master-name </li>
<li>page-master-odd </li>
<li>page-master-repeating </li>
<li>page-width </li>
<li>position (allowed values: "static" (default),"relative", "absolute", fixed ) </li>
<li>provisional-distance-between-starts </li>
<li>provisional-label-separation </li>
<li>right</li>
<li>rule-thickness </li>
<li>space-after.optimum </li>
<li>space-before.optimum </li>
<li>start-indent </li>
<li>text-align </li>
<li>text-align-last </li>
<li>text-indent </li>
<li>top</li>
<li>white-space-treatment </li>
<li>width</li>
<li>wrap-option</li> </ul>
</s2>
</s1>












+ 55
- 0
docs/xml-docs/fop/involved.xml View File

@@ -0,0 +1,55 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE s1 SYSTEM "sbk:/style/dtd/document.dtd">


<!-- getting involved -->

<s1 title="Getting involved">
<!-- <p>Our main website <jump href="http://xml.apache.org/overview.html">xml.apache.org</jump>
has a detailed description how to get involved. </p> The following is just a brief outline
containing the addresses concerning Fop.</p>-->
<s2 title="Read the Status file">
<p>The Status file contains the list of features people are working on at the moment.
And an outline what steps are next.</p>
</s2>
<s2 title="Subscribe to the fop discussion list">
<p>You can subscribe to fop-dev@xml.apache.org by sending an email
to <jump href="mailto:fop-dev-subscribe@xml.apache.org">fop-dev-subscribe@xml.apache.org</jump></p>
<p>Sending bug reports and feature requests to the list is a welcome and important contribution to
developing Fop. </p>
<p>Read also the <jump href="http://xml-archive.webweaving.org/xml-archive-fop/">archive</jump>
of the discussion list fop-dev to get an idea of the issues being discussed. </p>
</s2>
<s2 title="Look at the developer's code using cvs">
<p>Between releases the newest code can be accessed via cvs. To do this you need to install a cvs
client on your computer if it is not already there. An explanation how to connect to the
Fop source repository can be found at <jump href="http://xml.apache.org/cvs.html">http://xml.apache.org/cvs.html</jump>.
An introduction into cvs and the cvs manual can be found in the
<jump href="http://xml.apache.org/library.html">reference library</jump>.</p>
<p>All changes to the code repository are annonced in a special discussion group. You can subscribe
to fop-cvs@xml.apache.org by sending an email to <jump href="mailto:fop-cvs-subscribe@xml.apache.org">
fop-cvs-subscribe@xml.apache.org</jump>. If you want to contribute to the development of Fop you should subscribe,
because it is important that you follow changes being made. </p>
</s2>
<s2 title="Contributing code and documentation">
<p>If you want to contribute code (p.e. a bugfix) or documentation (p.e. an additional example), please do the following: </p>
<p>1) Make sure your code doesn't break the existing one and that Fop still compiles.</p>
<p>2) Create a file which shows the differences to the existing code.</p>
<p>3) Send this file to fop-dev@xml.apache.org.</p>
<p>One of the committers will test your code and commit it to the code repository.</p>
<p>BTW: The Apache project knows different roles for contributors, namely 'users', 'developers', 'committers' and the 'Project
Management Committee' (An explanation of these roles can be found <jump href="http://xml.apache.org/roles.html">here</jump>).</p>
</s2>
<s2 title="Get familiar with the Fop related standards">
<p>At the moment Fop is mainly a tools to render XSL:FO files to pdf. Therefore if you want to contribute to Fop you should become
familiar with these standards. You can find their internet addresses on our <jump href="specs.html">website</jump>.</p>
</s2>
<s2 title="Fop's architecture">
<p>A bird's eye view on the way Fop operates can be found in the document <jump href="architecture.html">FOP Mechanics</jump></p>
<p>If you want to extend the functionality of FOP by adding new formatting objects, you should do the following: </p>
<p>1. FO Object: Write a class which contains the description of your formatting object and put it into the package fop.fo.flow, fop.fo.pagination (if it is a property it goes to fop.fo.properties. The classes in this package are generated via an xslt stylesheet located in codegen/properties.xml)</p>
<p>2. Element Mapping: Add it to the list in fop.fo.StandardElementMapping (if it is a property you need to add it to fop.fo.PropertyListBuilder)</p>
<p>3. Area: Either your need can be fulfilled within one of the existing classes in fop.layout, then just add the code to handle the new fo/property or you must write a new one.</p>
<p>4. Renderer: Choose the renderer you are interested in. If you worked on an existing layout class you must add code to handle the new features to the already existing area specific method in the renderer class. Otherwise you have to add a new method. </p>
</s2>
</s1>

+ 57
- 0
docs/xml-docs/fop/license.xml View File

@@ -0,0 +1,57 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE s1 SYSTEM "sbk:/style/dtd/document.dtd">

<!-- License -->

<s1 title="License">
<s2 title="The Apache Software License, Version 1.1">
<p> Copyright (C) 1999 The Apache Software Foundation. All rights reserved.</p>
<p> Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:</p>
<p>1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
</p>

<p>2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
</p>

<p>3. The end-user documentation included with the redistribution, if any, must
include the following acknowledgment: "This product includes software
developed by the Apache Software Foundation (http://www.apache.org/)."
Alternately, this acknowledgment may appear in the software itself, if
and wherever such third-party acknowledgments normally appear.
</p>

<p>4. The names "FOP" and "Apache Software Foundation" must not be used to
endorse or promote products derived from this software without prior
written permission. For written permission, please contact
apache@apache.org.
</p>

<p>5. Products derived from this software may not be called "Apache", nor may
"Apache" appear in their name, without prior written permission of the
Apache Software Foundation.
</p>
<p>THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</p>
<p>
This software consists of voluntary contributions made by many individuals
on behalf of the Apache Software Foundation and was originally created by
James Tauber &lt;jtauber@jtauber.com>. For more information on the Apache
Software Foundation, please see <jump href="http://www.apache.org/">http://www.apache.org/</jump>.
</p>
</s2>
</s1>


+ 74
- 0
docs/xml-docs/fop/limitations.xml View File

@@ -0,0 +1,74 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE s1 SYSTEM "sbk:/style/dtd/document.dtd">


<!-- Limitations -->

<s1 title="Limitations">
<p>The main limitation at the moment is: FOP only supports the XSL working draft 21 Apr 1999,
not the latest from 27 March 2000. FOP implements the fo objects and properties listed
in <jump href="implemented.html">features</jump>, sometimes it does so only in a limited way.
</p>

<s2 title="list-block">
<p>The fo working draft allows describes two ways to markup lists.The list-block must have as
children either: 1) pairs of fo:list-item-label and fo:list-item-body formatting objects, or
2) fo:list-item formatting objects.</p>
<p>At the moment FOP only implements the second way. Therefore a list has a basic structure like this:</p>
<p><code>&lt;fo:list-block></code></p>
<p><code>&lt;fo:list-item></code></p>
<p><code>&lt;fo:list-item-label>&lt;fo:block>&lt;/fo:block>&lt;/fo:list-item-label></code></p>
<p><code>&lt;fo:list-item-body>&lt;fo:block>&lt;/fo:block>&lt;/fo:list-item-body></code></p>
<p><code>&lt;/fo:list-item></code></p>
<p><code>&lt;/fo:list-block></code></p>
</s2>
<s2 title="Padding">
<p>Padding works in conjunction with indents and spaces. It is only implemented
for blocks. At the moment padding can't be used to make extra space (indents+spaces
must be used), but only to control how much the background-color extends beyond
the content rectangle.
</p>
</s2>
<s2 title="Tables">
<p>There two limitations for tables: 1) FOP needs you to explicitly specify column widths
2) Cells have to contain block-level FOs. They can't contain straight character data.
</p>
<p>A working basic example of a table looks like this: </p>
<p><code>&lt;fo:table></code></p>
<p><code>&nbsp;&lt;fo:table-column column-width="150pt"/></code></p>
<p><code>&nbsp;&lt;fo:table-column column-width="150pt"/></code></p>
<p><code>&nbsp;&lt;fo:table-body font-size="10pt" font-family="sans-serif"></code></p>
<p><code>&nbsp;&nbsp;&lt;fo:table-row></code></p>
<p><code>&nbsp;&nbsp;&nbsp;&lt;fo:table-cell></code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;&lt;fo:block>text&lt;/fo:block></code></p>
<p><code>&nbsp;&nbsp;&nbsp;&lt;/fo:table-cell></code></p>
<p><code>&nbsp;&nbsp;&nbsp;&lt;fo:table-cell></code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;&lt;fo:block>text&lt;/fo:block></code></p>
<p><code>&nbsp;&nbsp;&nbsp;&lt;/fo:table-cell></code></p>
<p><code>&nbsp;&nbsp;&lt;/fo:table-row></code></p>
<p><code>&nbsp;&nbsp;&lt;fo:table-row></code></p>
<p><code>&nbsp;&nbsp;&nbsp;&lt;fo:table-cell></code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;&lt;fo:block>text&lt;/fo:block></code></p>
<p><code>&nbsp;&nbsp;&nbsp;&lt;/fo:table-cell></code></p>
<p><code>&nbsp;&nbsp;&nbsp;&lt;fo:table-cell></code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;&lt;fo:block>text&lt;/fo:block></code></p>
<p><code>&nbsp;&nbsp;&nbsp;&lt;/fo:table-cell></code></p>
<p><code>&nbsp;&nbsp;&lt;/fo:table-row></code></p>
<p><code>&nbsp;&nbsp;&lt;fo:table-row></code></p>
<p><code>&nbsp;&nbsp;&nbsp;&lt;fo:table-cell></code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;&lt;fo:block>text&lt;/fo:block></code></p>
<p><code>&nbsp;&nbsp;&nbsp;&lt;/fo:table-cell></code></p>
<p><code>&nbsp;&nbsp;&nbsp;&lt;fo:table-cell></code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;&lt;fo:block>text&lt;/fo:block></code></p>
<p><code>&nbsp;&nbsp;&nbsp;&lt;/fo:table-cell></code></p>
<p><code>&nbsp;&nbsp;&lt;/fo:table-row></code></p>
<p><code>&nbsp;&lt;/fo:table-body></code></p>
<p><code>&lt;/fo:table></code></p>
</s2>

<!--<s2 title="display-graphic">
<p>Which formats are supported? Compression etc. </p>
</s2>-->

</s1>

+ 60
- 0
docs/xml-docs/fop/readme.xml View File

@@ -0,0 +1,60 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE s1 SYSTEM "sbk:/style/dtd/document.dtd">

<!-- $Id$ -->
<!--
Authors:
James Tauber
Fotis Jannidis
Arved Sandstrom
-->


<!-- Overview -->

<s1 title="Fop">
<s2 title="What is FOP?">
<p>FOP is the world's first print formatter driven by XSL formatting
objects. It is a Java application that reads a formatting object
tree and then turns it into a PDF document. The formatting object
tree, can be in the form of an XML document (output by an XSLT engine
like XT or Xalan) or can be passed in memory as a DOM Document or (in
the case of XT) SAX events.
</p>
<p>FOP is part of Apache's XML project. The homepage of FOP is
<jump href="http://xml.apache.org/fop">http://xml.apache.org/fop</jump>.
</p>
</s2>

<s2 title="FOP Objectives">
<p>The goals of the Apache XML FOP Project are to deliver an XSL FO->PDF formatter that is compliant to at least the Basic
conformance level described in the 27 March 2000 XSL WD, and that complies with the 11 March 1999 Portable Document
Format Specification (Version 1.3) from Adobe Systems.
</p>

<p>Conformance to the XML 1.0 Recommendation, XSLT 1.0 Recommendation and the XML Namespaces Recommendation is
understood. Other relevant documents, such as the XPath and XLink Working Drafts, are referenced as necessary. The FOP
Project will attempt to use the latest version of evolving specifications.
</p>

<p>Secondary goals of the FOP Project (also, "FOP") are desirable requirements that also have a high priority.
</p>

<p>One secondary goal of the FOP Project is to deliver a follow-on version of the formatter that is compliant to the Extended
conformance level described in the XSL FO. Any formatting objects that cannot be translated into PDF will be explicitly
identified as such.
</p>

<p>Another secondary goal is to promote the conversion of SVG into PDF. The most natural mechanism for doing so is within
fo:instream-foreign-object FO's. The powerful graphics offered by both SVG and PDF are a natural fit, and it is
desirable that FOP natively supports an SVG content processor for the fo:instream-foreign-object.
</p>

<p>A final secondary goal is the continued refinement of the FOP design and implementation. In particular, maintaining the
separation between formatting and rendering, continuing to support the AWT Viewer renderer (backend), and providing
new renderers, are all desirable objectives.
</p>
</s2>

</s1>


+ 105
- 0
docs/xml-docs/fop/running.xml View File

@@ -0,0 +1,105 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE s1 SYSTEM "sbk:/style/dtd/document.dtd">

<!-- Running FOP -->

<s1 title="Running FOP">
<s2 title="Prerequisites">
<p>Following software must be installed:</p>
<p>a) Java 1.1.x or later (If you want to use AWTCommandLine, you need Swing)</p>
<p>b) An XML parser which supports SAX and DOM like
<jump href="http://xml.apache.org/xerces-j/index.html">Xerces-J</jump>.
(Xerces is the default xml parser)</p>
<p>c) If you have to produce the flow objects files, which are the input for FOP,
you need a transformation utility to create this files from your xml files.
Normally this is an XSLT stylesheet processor like
<jump href="http://www.jclark.com/xml/xt.html">XT</jump>
or <jump href="http://xml.apache.org/xalan/index.html">XALAN</jump>.
</p>
</s2>
<s2 title="Starting FOP as an standalone application">
<p>There are three ways to run FOP from the command line.</p>
<p>a) Batch processing formatting objects (fo) files: </p>
<p><code>java org.apache.fop.apps.CommandLine fo-file pdf-file</code></p>
<p>b) Batch processing xml files (includes production of the fo-files):</p>
<p><code>java org.apache.fop.apps.XTCommandLine xml-file xsl-file pdf-file</code></p>
<p>c) Previewing the fo-file:</p>
<p><code>java org.apache.fop.apps.AWTCommandLine fo-file</code></p>
<p>Each method uses next to the fop classes other packages. The following describes
each method in detail.</p>
<s3 title="Method One">
<p>One is to first use an XSLT engine to produce the formatting object tree as an
XML document and then running the class org.apache.fop.apps.CommandLine with the
formatting object file name and PDF filename as arguments. You need to set classpath
and set the used sax parser according to your enviroment
</p>
<p>Classpath settings: You will need to include FOP and your XML Parser
in your classpath and so you might invoke FOP, if Xerces-J is your xml parser:
</p>
<p><code>java -cp fop.jar;xerces.jar </code></p>
<p><code>org.apache.fop.apps.CommandLine fo-file pdf-file</code></p>
<p>If you want to use another sax parser, you will need to set the property
org.xml.sax.parser to any other SAX Parser class to use. The following example shows
the command line, if you use XP from James Clark:
</p>
<p><code>java -Dorg.xml.sax.parser=com.jclark.xml.sax.Driver</code></p>
<p><code>-cp fop.jar;xerces.jar;xp.jar</code></p>
<p><code>org.apache.fop.apps.CommandLine fo-file pdf-file</code></p>
<p>Note: The xerces jar file must be included, because xp has no dom support.</p>
</s3>
<s3 title="Method Two">
<p>Rather than performing transformation with an XSLT before invoking FOP, it is
possible, if you use XT as your XSLT engine, to just call FOP and have it call
XT for you. To do this, run the class org.apache.fop.apps.CommandLine with the
source XML file name, XSL file name and PDF file name as arguments. You will
need to include XT in your classpath and so you might invoke
</p>
<p><code>java -cp fop.jar;xt.jar;xerces.jar</code></p>
<p><code>org.apache.fop.apps.XTCommandLine xml-file xsl-file pdf-file</code></p>
<p>Again, if your SAX Parser is other than Xerces, you will need to set the property
org.xml.sax.parser to the SAX Parser class to use.
</p>
</s3>
<s3 title="Method Three">
<p>If you already produced the FO file, you can preview the results of your
transformation without using any pdf viewer by invoking FOP with the viewer
application. You will need to include FOP and your XML Parser in your classpath
</p>
<p><code>java -cp fop.jar;xerces.jar</code></p>
<p><code>org.apache.fop.apps.AWTCommandLine fo-file </code></p>
<p>The viewer uses the swing classes.</p>
<p>Note: If you are using java 2 or later (i.e. jdk 1.2. or later) you can put all
needed jar files into the subdirectory jdk1.2.x\jre\lib\ext (windows example). Then
FOP can be started without classpath:
</p>
<p><code>java org.apache.fop.apps.CommandLine fo-file pdf-file</code></p>
</s3>
</s2>
<s2 title="Running FOP on MacOS">
<!-- Contributed by Arved Sandstrom -->
<p>Ensure that you have a recent MRJ, and that you have downloaded and
unpacked the XP and SAX distributions. The xp.jar and sax.jar files work
as is on MacOS.
</p>
<p>Drag the FOP jarfile onto the JBindery icon. When the first dialog
appears, type "org.apache.fop.apps.CommandLine" in the "Class name" field.
Using UNIX syntax, type the names of the input formatting-object file and
the output PDF in the "Optional parameters" field.
</p>
<p>Click on the Classpath icon. To add the xp.jar and sax.jar files, click
the "Add .zip file" button, navigate to the file in question, and click
Open.
</p>
<p>Once both are added (the FOP jarfile will already be in the list), click
Run. A "stdout" window will appear and display FOP runtime messages.
</p>
</s2>
<s2 title="Problems">
<p>If you have problems running FOP, please have a look at the
<jump href="faq-running.html">FOP FAQ</jump>. If you don't find a solution there,
you can ask for help on the list fop-dev@xml.apache.org. Maybe it is a bug and
maybe somebody is already working on it.
</p>
</s2>
</s1>


+ 18
- 0
docs/xml-docs/fop/specs.xml View File

@@ -0,0 +1,18 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE s1 SYSTEM "sbk:/style/dtd/document.dtd">

<!-- FOP Relevant Specifications -->

<s1 title="FOP Relevant Specifications">
<ul>
<li><jump href="http://www.w3.org/TR/WD-xsl/">Latest XSL-FO Working Draft (27 March 2000)</jump></li>
<li><jump href="http://www.w3.org/TR/1999/WD-xsl-19990421/">XSL-FO Working Draft 21 Apr 1999 </jump></li>
<li><jump href="http://www.w3.org/TR/REC-xml">XML Recommendation</jump></li>
<li><jump href="http://www.w3.org/TR/xslt">XSLT Recommendation</jump></li>
<li><jump href="http://partners.adobe.com/asn/developer/acrosdk/DOCS/pdfspec.pdf">Portable Document Format (PDF) 1.3 Reference Manual </jump></li>
<li><jump href="http://www.megginson.com/SAX/">Simple API for XML (SAX)</jump></li>
<li><jump href="http://www.w3.org/TR/REC-DOM-Level-1">Document Object Model (DOM)</jump></li>
<li><jump href="http://www.w3.org/TR/REC-xml-names/">Namespaces in XML Recommendation</jump></li>
<li><jump href="http://java.sun.com/products/jdk/1.1/docs/index.html">Java JDK 1.1 Documentation</jump></li>
</ul>
</s1>

+ 26
- 0
docs/xml-docs/makedoc.bat View File

@@ -0,0 +1,26 @@
@echo off

echo Building Fop documentation (pdf)
echo ----------------

if "%JAVA_HOME%" == "" goto error

set LOCALCLASSPATH=%JAVA_HOME%\lib\tools.jar;%JAVA_HOME%\lib\classes.zip;..\..\lib\ant.jar;..\..\lib\xml.jar;..\..\lib;..\..\build\fop.jar
set ANT_HOME=.\lib

echo Building Fop documentation (pdf) ...

%JAVA_HOME%\bin\java.exe -Dant.home=%ANT_HOME% -classpath %LOCALCLASSPATH%;%CLASSPATH% org.apache.tools.ant.Main %1 %2 %3 %4 %5

goto end

:error

echo ERROR: JAVA_HOME not found in your environment.
echo Please, set the JAVA_HOME variable in your environment to match the
echo location of the Java Virtual Machine you want to use.

:end

rem set LOCALCLASSPATH=


+ 10
- 0
docs/xml-docs/readme View File

@@ -0,0 +1,10 @@
Fop documentation (xml version)

The files in these directory contain the Fop documentation as xml files.
The directory xml-docs/fop is a mirror of the files in the cvs repository
modul 'xml-site' /sources/fop. These files are used to create the html documentation
on xml.apache.org.

With makedoc.bat (win32) or makedoc.sh (unix) you can create a pdf file containing
the complete Fop documentation. These scripts use ant. If you have any trouble running them,
please look into build.xml in the root directory of this distribution.

+ 290
- 0
docs/xml-docs/xml2pdf.xsl View File

@@ -0,0 +1,290 @@
<?xml version="1.0"?>
<!-- XSLT stylesheet to convert the Fop documentation collected in one xml file into a fo file
for use in FOP

TBD: - The faq doesn't show in the content
- check why margin-bottom on the page with properties is too large
- check why keep-next not only doesn't work, but leads to repeating already printed lines
- make lines containing only code look nicer (smaller line height)
- check why in section "FO Formatting" p. 17 the bullets are overwritten
- correct the hack replacing nbsp with '-'
- handle the links correctly which have been external in the html doc and are now internal

-->

<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
>

<xsl:template match ="/">
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">

<!-- defines page layout -->
<fo:layout-master-set>

<fo:simple-page-master page-master-name="first"
height="29.7cm"
width="21cm"
margin-top="1.5cm"
margin-bottom="2cm"
margin-left="2.5cm"
margin-right="2.5cm">
<fo:region-before extent="1.5cm"/>
<fo:region-body margin-top="3cm"/>
<fo:region-after extent="1.5cm"/>
</fo:simple-page-master>

<fo:simple-page-master page-master-name="rest"
height="29.7cm"
width="21cm"
margin-top="1.5cm"
margin-bottom="2cm"
margin-left="2.5cm"
margin-right="2.5cm">
<fo:region-before extent="1.5cm"/>
<fo:region-body margin-top="2.5cm"/>
<fo:region-after extent="1.5cm"/>
</fo:simple-page-master>

</fo:layout-master-set>

<fo:page-sequence>
<fo:sequence-specification>
<fo:sequence-specifier-repeating page-master-first="first"
page-master-repeating="rest"/>
</fo:sequence-specification>

<fo:static-content flow-name="xsl-before">
<fo:block text-align="end"
font-size="10pt"
font-family="serif"
line-height="14pt" >
FOP documentation - p. <fo:page-number/>
</fo:block>
</fo:static-content>

<fo:flow flow-name="xsl-body">


<fo:block font-size="18pt"
font-family="sans-serif"
line-height="24pt"
space-after.optimum="15pt"
background-color="blue"
color="white"
text-align="centered">
FOP - an xsl:fo renderer
</fo:block>


<!-- generates table of contents and puts it into a table -->

<fo:block font-size="14pt"
font-family="sans-serif"
line-height="18pt"
space-after.optimum="10pt"
font-weight="bold"
start-indent="15pt">
Content
</fo:block>

<fo:table>
<fo:table-column column-width="1cm"/>
<fo:table-column column-width="15cm"/>
<fo:table-body font-size="12pt"
line-height="16pt"
font-family="sans-serif">
<xsl:for-each select="//s1"> <!-- An dieser Stelle muesste noch ein "oder finde faqs" stehen -->
<fo:table-row>
<fo:table-cell>
<fo:block text-align="end" >
<xsl:number value="position()" format="1"/>)
</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block text-align="start" >
<fo:simple-link color="blue">
<xsl:attribute name="internal-destination">
<xsl:value-of select="translate(.,' ),-.(','____')"/>
</xsl:attribute>
<xsl:value-of select="@title"/>
</fo:simple-link>
</fo:block>
</fo:table-cell>
</fo:table-row>
</xsl:for-each>
</fo:table-body>
</fo:table>


<xsl:apply-templates select="documentation"/>
</fo:flow>
</fo:page-sequence>
</fo:root>
</xsl:template>

<!-- s1 -->
<xsl:template match ="s1">
<fo:block font-size="18pt"
font-family="sans-serif"
line-height="24pt"
space-before.optimum="15pt"
space-after.optimum="15pt"
background-color="blue"
color="white"
text-align="centered"
>
<xsl:attribute name="id">
<xsl:value-of select="translate(.,' ),-.(','____')"/>
</xsl:attribute>
<xsl:value-of select="@title"/>
</fo:block>
<xsl:apply-templates/>
</xsl:template>

<!-- s2 -->
<xsl:template match ="s2">
<fo:block font-size="16pt"
font-family="sans-serif"
line-height="20pt"
space-before.optimum="15pt"
space-after.optimum="12pt"
text-align="centered"
padding-top="3pt"
>
<xsl:value-of select="@title"/>
</fo:block>
<xsl:apply-templates/>
</xsl:template>

<!-- s3 -->
<xsl:template match ="s3">
<fo:block font-size="14pt"
font-family="sans-serif"
line-height="18pt"
space-before.optimum="10pt"
space-after.optimum="9pt"
text-align="centered"
padding-top="3pt">
<xsl:value-of select="@title"/>
</fo:block>
<xsl:apply-templates/>
</xsl:template>

<!-- p [not(code)] -->
<xsl:template match ="p">
<fo:block font-size="11pt"
font-family="sans-serif"
line-height="13pt"
space-after.optimum="3pt"
space-before.optimum="3pt"
text-align="justified">
<xsl:apply-templates/>
</fo:block>
</xsl:template>

<!-- p + code
<xsl:template match ="p[code]">
<fo:block font-size="11pt"
font-family="sans-serif"
line-height="11pt"
space-after.optimum="0pt"
space-before.optimum="0pt"
text-align="start">
<xsl:apply-templates/>
</fo:block>
</xsl:template>
-->

<!-- faqs -->
<xsl:template match ="faqs">
<fo:block font-size="18pt"
font-family="sans-serif"
line-height="24pt"
space-before.optimum="15pt"
space-after.optimum="15pt"
background-color="blue"
color="white"
text-align="centered"
>
<xsl:attribute name="id">
<xsl:value-of select="translate(.,' ),-.(','____')"/>
</xsl:attribute>
<xsl:value-of select="@title"/>
</fo:block>
<xsl:apply-templates/>
</xsl:template>


<!-- faq -->
<xsl:template match ="faq">
<xsl:apply-templates/>
</xsl:template>

<!-- q in faq -->
<xsl:template match ="q">
<fo:block font-size="11pt"
font-family="sans-serif"
line-height="13pt"
space-after.optimum="3pt"
space-before.optimum="3pt"
text-align="justified">
<xsl:apply-templates/>
</fo:block>
</xsl:template>

<!-- a in faq -->
<xsl:template match ="a">
<xsl:apply-templates/>
</xsl:template>


<!-- jump (links) -->
<xsl:template match ="*/jump">
<fo:simple-link color="blue" external-destination="{@href}">
<xsl:apply-templates/>
</fo:simple-link>
</xsl:template>


<!-- code -->
<xsl:template match ="*/code">
<fo:inline-sequence font-size="10pt"
font-family="Courier">
<xsl:apply-templates/>
</fo:inline-sequence>
</xsl:template>


<!-- ul (unordered list) -->
<xsl:template match ="ul">
<fo:list-block start-indent="1cm"
provisional-distance-between-starts="12pt"
font-family="sans-serif"
font-size="11pt"
line-height="11pt">
<xsl:apply-templates/>
</fo:list-block>
</xsl:template>

<!-- li (list item) -->
<xsl:template match ="li">
<fo:list-item>
<fo:list-item-label>
<fo:block><fo:inline-sequence font-family="Symbol">&#183;</fo:inline-sequence></fo:block>
</fo:list-item-label>
<fo:list-item-body>
<fo:block space-after.optimum="4pt"
text-align="justified"
padding-top="3pt">
<xsl:apply-templates/>
</fo:block>
</fo:list-item-body>
</fo:list-item>
</xsl:template>


<!-- end body -->

</xsl:stylesheet>

Loading…
Cancel
Save