blob: 42879412a588cf1f2c814e8e0bc8c996ba1dfeca [file] [log] [blame]
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>ASF: Building The Documents</title>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<link rel="stylesheet" type="text/css" href="resources/apache-xalan.css" />
</head>
<!--
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
-->
<body>
<div id="title">
<table class="HdrTitle">
<tbody>
<tr>
<th rowspan="2">
<a href="../index.html">
<img alt="Trademark Logo" src="resources/XalanC-Logo-tm.png" width="190" height="90" />
</a>
</th>
<th text-align="center" width="75%">
<a href="index.html">Xalan-C/C++ Version 1.11</a>
</th>
</tr>
<tr>
<td valign="middle">Building The Documents</td>
</tr>
</tbody>
</table>
<table class="HdrButtons" align="center" border="1">
<tbody>
<tr>
<td>
<a href="http://www.apache.org">Apache Foundation</a>
</td>
<td>
<a href="http://xalan.apache.org">Xalan Project</a>
</td>
<td>
<a href="http://xerces.apache.org">Xerces Project</a>
</td>
<td>
<a href="http://www.w3.org/TR">Web Consortium</a>
</td>
<td>
<a href="http://www.oasis-open.org/standards">Oasis Open</a>
</td>
</tr>
</tbody>
</table>
</div>
<div id="navLeft">
<ul>
<li>
<a href="resources.html">Resources</a>
<br />
</li>
<li>
<a href="../index.html">Home</a>
</li></ul><hr /><ul>
<li>
<a href="index.html">Xalan-C++ 1.11</a>
</li>
<li>
<a href="whatsnew.html">What's New</a>
</li>
<li>
<a href="license.html">Licenses</a>
</li></ul><hr /><ul>
<li>
<a href="overview.html">Overview</a>
</li>
<li>
<a href="charter.html">Charter</a>
</li></ul><hr /><ul>
<li>
<a href="download.html">Download</a>
</li>
<li>
<a href="buildlibs.html">Build Libraries</a>
</li>
<li>
<a href="install.html">Installation</a>
</li>
<li>Build Documents<br />
</li></ul><hr /><ul>
<li>
<a href="samples.html">Sample Apps</a>
</li>
<li>
<a href="commandline.html">Command Line</a>
</li>
<li>
<a href="usagepatterns.html">Usage Patterns</a>
</li></ul><hr /><ul>
<li>
<a href="programming.html">Programming</a>
</li>
<li>
<a href="extensions.html">Extensions</a>
</li>
<li>
<a href="extensionslib.html">Extensions Library</a>
</li>
<li>
<a href="apiDocs/index.html">API Reference</a>
</li></ul><hr /><ul>
<li>
<a href="faq.html">Xalan-C FAQs</a>
</li></ul><hr /><ul>
<li>
<a href="whatsnew.html#bugs">Bugs</a>
</li>
<li>
<a href="http://xml.apache.org/xalan-j/test/run.html#how-to-run-c">Testing</a>
</li>
<li>
<a href="secureweb.html">Web Security</a>
</li>
</ul>
</div>
<div id="content">
<h2>Building The Documents</h2>
<ul>
<li>
<a href="#buildweb">Building the Xalan-C Web Pages</a>
</li>
<ul>
<li>
<a href="#b_web_1">Documentation Source Tree</a>
</li>
<li>
<a href="#b_web_2">Destination Build Tree</a>
</li>
<li>
<a href="#b_web_3">The Web Page Build Environment</a>
</li>
<li>
<a href="#b_web_4">Preparing the Navigation File</a>
</li>
<li>
<a href="#b_web_5">Creating the Web Pages</a>
</li>
</ul>
<li>
<a href="#buildapi">Building the Xalan-C API Reference</a>
</li>
<ul>
<li>
<a href="#b_api_1">API Configuration Source Tree</a>
</li>
<li>
<a href="#b_api_2">Destination Path for API Web Pages</a>
</li>
<li>
<a href="#b_api_3">Build the API Web Pages</a>
</li>
</ul>
<li>
<a href="#integrateapi">Integrate API With Xalan-C Project Web Pages</a>
</li>
</ul>
<a name="buildweb">&#8204;</a>
<p align="right" size="2">
<a href="#content">(top)</a>
</p>
<h3>Building the Xalan-C Web Pages</h3>
<p>This section shows how to build the documentation products for Xalan-C/C++.
This is a subproject of the ASF XALAN PMC.
</p>
<p>The XALAN PMC project web page [<a href="http://xalan.apache.org">http://xalan.apache.org</a>] is a top-level page
with branches to the subprojects that include the Java and C/C++ code libraries.
</p>
<p>The Xalan-C/C++ home web page [<a href="http://xml.apache.org/xalan-c">http://xml.apache.org/xalan-c</a>]
is the content
construction that is being described here.
</p>
<p>The Apache StyleBook Java program is no longer needed to create useful web pages.
You should have a standard XSLT transform utility.
The "Xalan" command-line program distributed with Xalan-C works just fine.
</p>
<a name="b_web_1">&#8204;</a>
<p align="right" size="2">
<a href="#content">(top)</a>
</p>
<h4>Documentation Source Tree</h4>
<blockquote class="source">
<pre>
xalan/c/trunk/xdocs/sources/
entities.ent -- Product specific entities
make-book.bat -- Build All Web Pages
make-xalan.bat -- Build Single Web Page
xalan-book.xslt -- Transformation for StyleBook XML
xalan.xml -- The Navigation Panel for Xalan-C Pages
xalan/c/trunk/xdocs/sources/xslt-resources/
{Common components used by Xalan-C Web Pages}
apache-xalan.css -- The Web Page Presentation Style
asf_logo.png -- The ASF Trademark Logo
note.gif -- A (note:) graphic
xalan/c/trunk/xdocs/sources/xalan/
{The StyleBook XML Sources for Xalan-C Web Pages}
index.xml -- This creates the root index.html
resources.xml -- A resources dispatch page
xalan/c/trunk/xdocs/style/dtd/
{Resources for Apache StyleBook Validation}
blocks.ent
book.dtd
changes.dtd
characters.ent
document.dtd
faqs.dtd
links.ent
markup.ent
</pre>
</blockquote>
<a name="b_web_2">&#8204;</a>
<p align="right" size="2">
<a href="#content">(top)</a>
</p>
<h4>Destination Build Tree</h4>
<blockquote class="source">
<pre>
xalan/c/trunk/build/docs/html/
{The Xalan-C project html Web Pages go here}
index.html -- This is the root of the Xalan-C subproject
xalan/c/trunk/build/docs/html/resources/
{Resources to support Xalan-C project html Web Pages}
apache-xalan.css
asf_logo.png
note.gif
xalan/c/trunk/build/docs/html/apiDocs/
{The Xalan-C API Web Pages go here}
index.html -- This is the root of the Xalan-C API Documents
</pre>
</blockquote>
<a name="b_web_3">&#8204;</a>
<p align="right" size="2">
<a href="#content">(top)</a>
</p>
<h4>The Web Page Build Environment</h4>
<p>The examples here describe how to build the Xalan-C/C++ web pages when
connected to the a copy of the (xdocs/sources) directory. So connect to it.
</p>
<p>The StyleBook DTD validation files are in the (xdocs/style/dtd) directory.
</p>
<p>The StyleBook XML sources for the web pages are in the (xdocs/sources/xalan) directory. Each web page is associated with an XML file in this directory. The transformed output is to be placed in the (build/docs/html) directory. The source XML file and the destination HTML file have the same base filename.
</p>
<p>The Web Page output directory is (build/docs/html).
</p>
<p>After creating the web pages, copy the (xdocs/sources/xslt-resources/*) files to the (build/docs/html/resources) directory.
</p>
<p>Graphic images for individual web pages are in the (xdocs/xalan-graphic) directory and later copied to the (build/docs/html) directory.
</p>
<a name="b_web_4">&#8204;</a>
<p align="right" size="2">
<a href="#content">(top)</a>
</p>
<h4>Preparing the Navigation File</h4>
<p>The (xdocs/sources/xalan.xml) is the project navigation file that is on
the left side of each web page.
The root element is &lt;book&gt;
containing child elements of &lt;hidden&gt;, &lt;external&gt;,
&lt;document&gt;, &lt;resources&gt;, &lt;faqs&gt;, and &lt;separator&gt;. The format of this navigation file is inherited from the StyleBook Java program. Our stylesheet uses the &lt;book&gt; to provide only a navigation panel. It does not control the production of the entire suite of web pages.
</p>
<p>The markup is validated by DTD and entity definitions in the (xdocs/style/dtd) directory.
</p>
<p>The "id=" attribute is the name of the web page file without extension.
</p>
<p>The "label=" attribute is the navigation text.
</p>
<p>The "source=" attribute is the name of the StyleBook XML source file.
</p>
<p>The "href=" attribute is a link to an external resource.
</p>
<a name="b_web_5">&#8204;</a>
<p align="right" size="2">
<a href="#content">(top)</a>
</p>
<h4>Creating the Web Pages</h4>
<p>The XSLT transformation utility must support top-level parameters.
The <code>Xalan</code> command-line program built and distributed with the this project
has sufficient capability to create the project web pages.
The <code>xalan-book.xslt</code> stylesheet is designed to interpret StyleBook XML and create XHTML web pages for the Xalan-C project.
</p>
<p>Example: Create the <code>index.html</code> web page from <code>index.xml</code> source. The arguments are shown on separate lines for convenience of presentation.
</p>
<blockquote class="source">
<pre>
Xalan.exe
-p sectionid "'index'"
-p createdate "'Tue 08/09/2011'"
xalan\index.xml
xalan-book.xslt
&gt; ..\..\build\docs\html\index.html
</pre>
</blockquote>
<p>Do the same for each web page replacing <code>index</code>,
<code>index.xml</code>, and <code>index.html</code> in the above example.
</p>
<p>Other command-line XSLT processors would have a different calling syntax.
Check your documentation.</p>
<p>I use batch files or shell scripts to automate this process.
The following batch files are what I use on Windows platforms.
</p>
<p>The <code>make-book.bat</code> file is used to create all web pages:
</p>
<blockquote class="source">
<pre>
mkdir ..\..\build\docs\html\resources
call make-xalan usagepatterns
call make-xalan samples
call make-xalan resources
call make-xalan install
call make-xalan download
call make-xalan overview
call make-xalan charter
call make-xalan whatsnew
call make-xalan extensionslib
call make-xalan commandline
call make-xalan readme
call make-xalan releasenotes
call make-xalan programming
call make-xalan getstarted
call make-xalan index
call make-xalan extensions
call make-xalan faq
call make-xalan license
call make-xalan buildlibs
call make-xalan secureweb
copy xalan-graphic\*.* ..\..\build\docs\html
copy xslt-resources\*.* ..\..\build\docs\html\resources
</pre>
</blockquote>
<p>The <code>make-xalan.bat</code> file to create a single web page:
</p>
<blockquote class="source">
<pre>
::
:: Set the current path to include a stylesheet transformation utility
::
:: %1 The document filename (without extension) to transform
::
:: %XALANEXSLT% The exslt stylesheet transformation utility
::
:: %XALANSTYLE% The XSLT stylesheet to convert STYLEBOOK markup
::
:: %XALANXMLDIR% Source directory of STYLEBOOK markup XML documents
::
:: %XALANOUTDIR% Target directory of XHTML web page documents
::
:: %WEBCREATED% Web Page Creation Date
::
:: sectionid Top-level stylesheet parameter (document file id)
::
:: createdate Top-level stylesheet parameter (web page creation date)
::
SET WEBCREATED=%DATE%
SET XALANEXSLT=..\..\bin\xalan.exe
SET XALANSTYLE=xalan-book.xslt
SET XALANXMLDIR=xalan
SET XALANOUTDIR=..\..\build\docs\html
"%XALANEXSLT%" -p sectionid "'%1'" -p createdate "'%WEBCREATED%'" \
%XALANXMLDIR%\%1.xml %XALANSTYLE% &gt;% XALANOUTDIR%\%1.html
</pre>
</blockquote>
<a name="buildapi">&#8204;</a>
<p align="right" size="2">
<a href="#content">(top)</a>
</p>
<h3>Building the Xalan-C API Reference</h3>
<p>This section shows how to build the Xalan-C/C++ application program interface (API) documents using the <a href="http://www.doxygen.org">Doxygen</a> and
<a href="http://www.graphviz.org">GraphViz</a> programs. These required software packages are available for most Unix systems.
</p>
<a name="b_api_1">&#8204;</a>
<p align="right" size="2">
<a href="#content">(top)</a>
</p>
<h4>API Configuration Source Tree</h4>
<blockquote class="source">
<pre>
xalan/c/trunk/src/xalanc/ -- [*.h, *.hpp] source code files
xalan/c/trunk/xdocs/
DoxyfileXalan -- The doxygen configuration file
xalan/c/trunk/xdocs/html/apiDocs/
asf_logo_wide.gif -- The wide ASF trademark logo
footer.html -- The footer html fragment for copyright
header.html -- Header html fragment for document title
header-local.html -- Header html fragment for optional title
</pre>
</blockquote>
<p>Note: (ApacheLogo.jpg) is replaced with (asf_logo_wide.gif).
</p>
<p>Note: (diagramnotes.html) is replaced with (graph_legend.html) created by doxygen.
</p>
<a name="b_api_2">&#8204;</a>
<p align="right" size="2">
<a href="#content">(top)</a>
</p>
<h4>Destination Path for API Web Pages</h4>
<p>The Xalan-C/C++ API pages are constructed here.</p>
<blockquote class="source">
<pre>
xalan/c/trunk/build/docs/apiDocs/html
</pre>
</blockquote>
<a name="b_api_3">&#8204;</a>
<p align="right" size="2">
<a href="#content">(top)</a>
</p>
<h4>Build the API Web Pages</h4>
<p>You must have usable "doxygen" and "dot" programs in your path. The "dot" program is part of the GraphViz distribution.
</p>
<p>Connect to your development sources or SVN snapshot.<br />
<blockquote class="source">
<pre>
xalan/c/trunk/xdocs/
</pre>
</blockquote>
Run the doxygen (or doxywizard) program.<br />
<blockquote class="source">
<pre>
doxygen DoxyfileXalan 2&gt;errors.log | tee doxygen.log
</pre>
</blockquote>
Examine the (errors.log) file for any fatal errors. Lots of warnings are ok.
You can examine the constructed web pages with your favorite browser.<br />
<blockquote class="source">
<pre>
% cd xalan/c/trunk/build/docs/apiDocs/html
% iceweasel index.html &amp;
</pre>
</blockquote>
</p>
<a name="integrateapi">&#8204;</a>
<p align="right" size="2">
<a href="#content">(top)</a>
</p>
<h3>Integrate API With Xalan-C Project Web Pages</h3>
<p>Copy the contents of <br />
<blockquote class="source">
<pre>
xalan/c/trunk/build/docs/apiDocs/html/*
</pre>
</blockquote>
to the Xalan-C Project Web Pages found at <br />
<blockquote class="source">
<pre>xalan/c/trunk/build/docs/html/apiDocs/
</pre>
</blockquote>
Copy the trademark logo <br />
<blockquote class="source">
<pre>
xalan/c/trunk/xdocs/html/apiDocs/asf_logo_wide.gif
</pre>
</blockquote>
to its final resting place <br />
<blockquote class="source">
<pre>
xalan/c/trunk/build/docs/html/apiDocs/
</pre>
</blockquote>
</p>
<p align="right" size="2">
<a href="#content">(top)</a>
</p>
</div>
<div id="footer">Copyright © 1999-2012 The Apache Software Foundation<br />Apache, Xalan, and the Feather logo are trademarks of The Apache Software Foundation<div class="small">Web Page created on - Fri 06/15/2012</div>
</div>
</body>
</html>