1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
---|
2 | <html xmlns="http://www.w3.org/1999/xhtml"><head>
|
---|
3 | <meta http-equiv="X-UA-Compatible" content="IE=edge"></meta>
|
---|
4 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta>
|
---|
5 | <title>Generating webhelp output using the Ant build.xml file - - README: Web-based Help from DocBook XML</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"></meta><meta name="description" content="Installation instructions"></meta><link rel="home" href="index.html" title="README: Web-based Help from DocBook XML"></link><link rel="up" href="ch02.html" title="Using the package"></link><link rel="prev" href="ch02.html" title="Using the package"></link><link rel="next" href="ch02s02.html" title="Using and customizing the output"></link><meta name="Section-title" content="Generating webhelp output using the Ant build.xml file"></meta><script type="text/javascript">
|
---|
6 | //The id for tree cookie
|
---|
7 | var treeCookieId = "treeview-1102";
|
---|
8 | var language = "en";
|
---|
9 | var w = new Object();
|
---|
10 | //Localization
|
---|
11 | txt_filesfound = 'Results';
|
---|
12 | txt_enter_at_least_1_char = "You must enter at least one character.";
|
---|
13 | txt_browser_not_supported = "JavaScript is disabled on your browser. Please enable JavaScript to enjoy all the features of this site.";
|
---|
14 | txt_please_wait = "Please wait. Search in progress...";
|
---|
15 | txt_results_for = "Results for: ";
|
---|
16 | </script><link rel="shortcut icon" href="favicon.ico" type="image/x-icon"></link><link rel="stylesheet" type="text/css" href="common/css/positioning.css"></link><link rel="stylesheet" type="text/css" href="common/jquery/theme-redmond/jquery-ui-1.8.2.custom.css"></link><link rel="stylesheet" type="text/css" href="common/jquery/treeview/jquery.treeview.css"></link><style type="text/css">
|
---|
17 |
|
---|
18 | #noscript{
|
---|
19 | font-weight:bold;
|
---|
20 | background-color: #55AA55;
|
---|
21 | font-weight: bold;
|
---|
22 | height: 25spx;
|
---|
23 | z-index: 3000;
|
---|
24 | top:0px;
|
---|
25 | width:100%;
|
---|
26 | position: relative;
|
---|
27 | border-bottom: solid 5px black;
|
---|
28 | text-align:center;
|
---|
29 | color: white;
|
---|
30 | }
|
---|
31 |
|
---|
32 | input {
|
---|
33 | margin-bottom: 5px;
|
---|
34 | margin-top: 2px;
|
---|
35 | }
|
---|
36 | .folder {
|
---|
37 | display: block;
|
---|
38 | height: 22px;
|
---|
39 | padding-left: 20px;
|
---|
40 | background: transparent url(common/jquery/treeview/images/folder.gif) 0 0px no-repeat;
|
---|
41 | }
|
---|
42 | span.contentsTab {
|
---|
43 | padding-left: 20px;
|
---|
44 | background: url(common/images/toc-icon.png) no-repeat 0 center;
|
---|
45 | }
|
---|
46 | span.searchTab {
|
---|
47 | padding-left: 20px;
|
---|
48 | background: url(common/images/search-icon.png) no-repeat 0 center;
|
---|
49 | }
|
---|
50 |
|
---|
51 | /* Overide jquery treeview's defaults for ul. */
|
---|
52 | .treeview ul {
|
---|
53 | background-color: transparent;
|
---|
54 | margin-top: 4px;
|
---|
55 | }
|
---|
56 | #webhelp-currentid {
|
---|
57 | background-color: #D8D8D8 !important;
|
---|
58 | }
|
---|
59 | .treeview .hover { color: black; }
|
---|
60 | .filetree li span a { text-decoration: none; font-size: 12px; color: #517291; }
|
---|
61 |
|
---|
62 | /* Override jquery-ui's default css customizations. These are supposed to take precedence over those.*/
|
---|
63 | .ui-widget-content {
|
---|
64 | border: 0px;
|
---|
65 | background: none;
|
---|
66 | color: none;
|
---|
67 | }
|
---|
68 | .ui-widget-header {
|
---|
69 | color: #e9e8e9;
|
---|
70 | border-left: 1px solid #e5e5e5;
|
---|
71 | border-right: 1px solid #e5e5e5;
|
---|
72 | border-bottom: 1px solid #bbc4c5;
|
---|
73 | border-top: 4px solid #e5e5e5;
|
---|
74 | border: medium none;
|
---|
75 | background: #F4F4F4; /* old browsers */
|
---|
76 | background: -moz-linear-gradient(top, #F4F4F4 0%, #E6E4E5 100%); /* firefox */
|
---|
77 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#F4F4F4), color-stop(100%,#E6E4E5)); /* webkit */
|
---|
78 | font-weight: none;
|
---|
79 | }
|
---|
80 | .ui-widget-header a { color: none; }
|
---|
81 | .ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default {
|
---|
82 | border: none; background: none; font-weight: none; color: none; }
|
---|
83 | .ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: black; text-decoration: none; }
|
---|
84 | .ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: none; background: none; font-weight: none; color: none; }
|
---|
85 |
|
---|
86 | .ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: none; background: none; font-weight: none; color: none; }
|
---|
87 | .ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited {
|
---|
88 | color: black; text-decoration: none;
|
---|
89 | background: #C6C6C6; /* old browsers */
|
---|
90 | background: -moz-linear-gradient(top, #C6C6C6 0%, #D8D8D8 100%); /* firefox */
|
---|
91 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#C6C6C6), color-stop(100%,#D8D8D8)); /* webkit */
|
---|
92 | -webkit-border-radius:15px; -moz-border-radius:10px;
|
---|
93 | border: 1px solid #f1f1f1;
|
---|
94 | }
|
---|
95 | .ui-corner-all { border-radius: 0 0 0 0; }
|
---|
96 |
|
---|
97 | .ui-tabs { padding: .2em;}
|
---|
98 | .ui-tabs .ui-tabs-nav li { top: 0px; margin: -2px 0 1px; text-transform: uppercase; font-size: 10.5px;}
|
---|
99 | .ui-tabs .ui-tabs-nav li a { padding: .25em 2em .25em 1em; margin: .5em; text-shadow: 0 1px 0 rgba(255,255,255,.5); }
|
---|
100 | /**
|
---|
101 | * Basic Layout Theme
|
---|
102 | *
|
---|
103 | * This theme uses the default layout class-names for all classes
|
---|
104 | * Add any 'custom class-names', from options: paneClass, resizerClass, togglerClass
|
---|
105 | */
|
---|
106 |
|
---|
107 | .ui-layout-pane { /* all 'panes' */
|
---|
108 | background: #FFF;
|
---|
109 | border: 1px solid #BBB;
|
---|
110 | padding: 05x;
|
---|
111 | overflow: auto;
|
---|
112 | }
|
---|
113 |
|
---|
114 | .ui-layout-resizer { /* all 'resizer-bars' */
|
---|
115 | background: #DDD;
|
---|
116 | top:100px
|
---|
117 | }
|
---|
118 |
|
---|
119 | .ui-layout-toggler { /* all 'toggler-buttons' */
|
---|
120 | background: #AAA;
|
---|
121 | }
|
---|
122 |
|
---|
123 | </style><!--[if IE]>
|
---|
124 | <link rel="stylesheet" type="text/css" href="../common/css/ie.css"/>
|
---|
125 | <![endif]--><script type="text/javascript" src="common/browserDetect.js"></script><script type="text/javascript" src="common/jquery/jquery-1.7.2.min.js"></script><script type="text/javascript" src="common/jquery/jquery.ui.all.js"></script><script type="text/javascript" src="common/jquery/jquery.cookie.js"></script><script type="text/javascript" src="common/jquery/treeview/jquery.treeview.min.js"></script><script type="text/javascript" src="common/jquery/layout/jquery.layout.js"></script><script type="text/javascript" src="search/l10n.js"></script><script type="text/javascript" src="search/htmlFileInfoList.js"></script><script type="text/javascript" src="search/nwSearchFnt.js"></script><script type="text/javascript" src="search/stemmers/en_stemmer.js"><!--//make this scalable to other languages as well.--></script><script type="text/javascript" src="search/index-1.js"></script><script type="text/javascript" src="search/index-2.js"></script><script type="text/javascript" src="search/index-3.js"></script></head><body><noscript><div id="noscript">JavaScript is disabled on your browser. Please enable JavaScript to enjoy all the features of this site.</div></noscript><div id="header"><a href="index.html"><img style="margin-right: 2px; height: 59px; padding-right: 25px; padding-top: 8px" align="right" src="common/images/logo.png" alt=" Documentation"></img></a><h1>README: Web-based Help from DocBook XML<br></br>Using the package</h1><div id="navheader"><table class="navLinks"><tr><td><a id="showHideButton" href="#" onclick="myLayout.toggle('west')" class="pointLeft" tabindex="5" title="Hide TOC tree">Sidebar
|
---|
126 | </a></td><td><a accesskey="p" class="navLinkPrevious" tabindex="5" href="ch02.html">Prev</a>
|
---|
127 | |
|
---|
128 | <a accesskey="u" class="navLinkUp" tabindex="5" href="ch02.html">Up</a>
|
---|
129 | |
|
---|
130 | <a accesskey="n" class="navLinkNext" tabindex="5" href="ch02s02.html">Next</a></td></tr></table></div></div><div id="content"><div class="section"><div xmlns="" class="titlepage"><div><div><h2 xmlns="http://www.w3.org/1999/xhtml" class="title" style="clear: both"><a id="idp125040"></a>Generating webhelp output using the Ant build.xml
|
---|
131 | file</h2></div></div></div>
|
---|
132 | <div class="procedure"><a id="idp126912"></a><p class="title"><strong>Procedure 1. To install the package</strong></p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>The examples in this procedure assume a Windows
|
---|
133 | installation, but the process is the same in other
|
---|
134 | environments, <span class="foreignphrase"><em class="foreignphrase">mutatis
|
---|
135 | mutandis</em></span>. In an environment where unix
|
---|
136 | shell command are available, you can also use the
|
---|
137 | <code class="filename">Makefile.sample</code> as a starting point
|
---|
138 | for creating your build script. To use
|
---|
139 | <code class="filename">Makefile.sample</code> you must have
|
---|
140 | <span class="command"><strong>xsltproc</strong></span> and <span class="command"><strong>java</strong></span>
|
---|
141 | available in your <code class="envar">PATH</code>. You can also use
|
---|
142 | the <a class="ulink" href="http://docbkx-tools.sourceforge.net/docbkx-samples/manual.html" target="_top">Docbkx Maven plugin</a> to generate webhelp.</p></div><ol class="procedure" type="1"><li class="step"><p>If necessary, install <a class="ulink" href="http://www.java.com/en/download/manual.jsp" target="_top">Java
|
---|
143 | 1.6</a> or higher.</p><ol type="a" class="substeps"><li class="step"><p>Confirm that Java is installed and in your <code class="envar">PATH</code> by typing the
|
---|
144 | following at a command prompt: </p><pre class="programlisting">java -version</pre><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>To build the indexer, you must have the JDK.</p></div></li></ol></li><li class="step"><p>If necessary, install <a class="ulink" href="http://ant.apache.org/bindownload.cgi" target="_top">Apache
|
---|
145 | Ant</a> 1.8.0 or higher. See <a class="ulink" href="http://ant.apache.org/manual/install.html" target="_top">Ant installation instructions</a>.</p><ol type="a" class="substeps"><li class="step"><p>Unzip the Ant binary distribution to a convenient location on your system. For
|
---|
146 | example: <code class="filename">c:\Program Files</code>.</p></li><li class="step"><p>Set the environment variable <code class="envar">ANT_HOME</code> to the top-level Ant
|
---|
147 | directory. For example: <code class="filename">c:\Program Files\apache-ant-1.8.0</code>. </p><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Tip</h3><p>See <a class="ulink" href="http://support.microsoft.com/kb/310519" target="_top">How To Manage
|
---|
148 | Environment Variables in Windows XP</a> for information on setting
|
---|
149 | environment variables.</p></div></li><li class="step"><p>Add the Ant <code class="filename">bin</code> directory to your <code class="envar">PATH</code>. For
|
---|
150 | example: <code class="filename">c:\Program Files\apache-ant-1.8.0\bin</code></p></li><li class="step"><p>Confirm that Ant is installed by typing the following at a command prompt:
|
---|
151 | </p><pre class="programlisting">ant -version</pre><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>If you see a message about the file <code class="filename">tools.jar</code> being
|
---|
152 | missing, you can safely ignore it.</p></div></li></ol></li><li class="step"><p>Download <a class="ulink" href="http://prdownloads.sourceforge.net/saxon/saxon6-5-5.zip" target="_top">Saxon
|
---|
153 | 6.5.x</a> and unzip the distribution to a convenient location on your file system.
|
---|
154 | You will use the path to <code class="filename">saxon.jar</code> in <a class="xref" href="ch02s01.html#edit-build-properties" title="Step 5">Step 5</a> below.</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>The <code class="filename">build.xml</code> has only been tested with Saxon 6.5, though
|
---|
155 | it could be adapted to work with other XSLT processors. However, when you generate
|
---|
156 | output, the Saxon jar must <span class="bold"><strong>not</strong></span> be in your
|
---|
157 | <code class="envar">CLASSPATH</code>.</p></div></li><li class="step"><p>Download <a class="ulink" href="https://xerces.apache.org/xerces2-j/" target="_top">Xerces2
|
---|
158 | Java</a> and extract it to a convenient location on
|
---|
159 | your file system. You will need the
|
---|
160 | <code class="filename">xercesImpl.jar</code> and
|
---|
161 | <code class="filename">xml-apis.jar</code> from this distribution
|
---|
162 | in in <a class="xref" href="ch02s01.html#edit-build-properties" title="Step 5">Step 5</a>. </p></li><li class="step"><a id="edit-build-properties"></a><p>In a text editor, edit the
|
---|
163 | <code class="filename">build.properties</code> file in the
|
---|
164 | webhelp directory and make the changes indicated by the comments.</p><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Important</h3><p>You must set appropriate values for
|
---|
165 | <code class="code">xslt-processor-classpath</code>,
|
---|
166 | <code class="code">xercesImpl.jar</code>, and
|
---|
167 | <code class="code">xml-apis.jar</code>.</p></div><p>See the DocBook <a class="ulink" href="../../../doc/html/webhelp.html" target="_top">reference
|
---|
168 | documentation</a> for detailed information about the
|
---|
169 | available webhelp and other parameters. Note that not all
|
---|
170 | DocBook parameters are passed in to the xsls by the
|
---|
171 | <code class="filename">build.xml</code> by default. You may need
|
---|
172 | to modify the <code class="filename">build.xml</code> to pass in
|
---|
173 | some DocBook
|
---|
174 | parameters.</p><pre class="programlisting">
|
---|
175 | # The path (relative to the build.xml file) to your input document.
|
---|
176 | # To use your own input document, create a build.xml file of your own
|
---|
177 | # and import this build.xml.
|
---|
178 | input-xml=docsrc/readme.xml
|
---|
179 |
|
---|
180 | # The directory in which to put the output files.
|
---|
181 | # This directory is created if it does not exist.
|
---|
182 | output-dir=docs
|
---|
183 |
|
---|
184 | # If you are using a customization layer that imports webhelp.xsl, use
|
---|
185 | # this property to point to it.
|
---|
186 | stylesheet-path=${ant.file.dir}/xsl/webhelp.xsl
|
---|
187 |
|
---|
188 | # If your document has image directories that need to be copied
|
---|
189 | # to the output directory, you can list patterns here.
|
---|
190 | # See the Ant documentation for fileset for documentation
|
---|
191 | # on patterns.
|
---|
192 | #input-images-dirs=images/**,figures/**,graphics/**
|
---|
193 |
|
---|
194 | # By default, the ant script assumes your images are stored
|
---|
195 | # in the same directory as the input-xml. If you store your
|
---|
196 | # image directories in another directory, specify it here.
|
---|
197 | # and uncomment this line.
|
---|
198 | #input-images-basedir=/path/to/image/location
|
---|
199 |
|
---|
200 | <span class="emphasis"><em># Modify the follosing so that they point to your local
|
---|
201 | # copy of the jars indicated:
|
---|
202 | # * Saxon 6.5 jar
|
---|
203 | # * Xerces 2: xercesImpl.jar
|
---|
204 | # * xml-commons: xml-apis.jar
|
---|
205 | xslt-processor-classpath=/usr/share/java/saxon-6.5.5.jar
|
---|
206 | xercesImpl.jar=/usr/share/java/xercesImpl.jar
|
---|
207 | xml-apis.jar=/usr/share/java/xml-apis.jar
|
---|
208 | </em></span>
|
---|
209 | # For non-ns version only, this validates the document
|
---|
210 | # against a dtd.
|
---|
211 | validate-against-dtd=true
|
---|
212 |
|
---|
213 | # The extension for files to be indexed (html/htm/xhtml etc.)
|
---|
214 | html.extension=html
|
---|
215 |
|
---|
216 | # Set this to false if you don't need a search tab.
|
---|
217 | webhelp.include.search.tab=true
|
---|
218 |
|
---|
219 | # indexer-language is used to tell the search indexer which language
|
---|
220 | # the docbook is written. This will be used to identify the correct
|
---|
221 | # stemmer, and punctuations that differs from language to language.
|
---|
222 | # see the documentation for details. en=English, fr=French, de=German,
|
---|
223 | # zh=Chinese, ja=Japanese etc.
|
---|
224 | webhelp.indexer.language=en
|
---|
225 |
|
---|
226 | # Enables/Disables stemming
|
---|
227 | # Stemming allows better querying for the search
|
---|
228 | enable.stemming=true
|
---|
229 |
|
---|
230 | # Set admon.graphics to 1 to user graphics for note, tip, etc.
|
---|
231 | admon.graphics=0
|
---|
232 | suppress.footer.navigation=0</pre></li><li class="step"><p>Test the package by running the command <code class="code">ant
|
---|
233 | webhelp -Doutput-dir=test-ouput</code> at the command
|
---|
234 | line in the webhelp directory. It should generate a copy
|
---|
235 | of this documentation in the <code class="filename">doc</code> directory. Type <code class="code">start
|
---|
236 | test-output\index.html</code> to open the output in a
|
---|
237 | browser. Once you have confirmed that the process worked,
|
---|
238 | you can delete the <code class="filename">test-output</code> directory. </p></li><li class="step"><p>To process your own document, simply refer to this package from another
|
---|
239 | <code class="filename">build.xml</code> in arbitrary location on your system:</p><ol type="a" class="substeps"><li class="step"><p>Create a new <code class="filename">build.xml</code> file that defines the name of your
|
---|
240 | source file, the desired output directory, and imports the
|
---|
241 | <code class="filename">build.xml</code> from this package. For example:
|
---|
242 | </p><pre class="programlisting"><project>
|
---|
243 | <property name="input-xml" value="<em class="replaceable"><code>path-to/yourfile.xml</code></em>"/>
|
---|
244 | <property name="input-images-dirs" value="<em class="replaceable"><code>images/** figures/** graphics/**</code></em>"/>
|
---|
245 | <property name="output-dir" value="<em class="replaceable"><code>path-to/desired-output-dir</code></em>"/>
|
---|
246 | <import file="<em class="replaceable"><code>path-to/docbook-webhelp/</code></em>build.xml"/>
|
---|
247 | </project></pre></li><li class="step"><p>From the directory containing your newly created <code class="filename">build.xml</code>
|
---|
248 | file, type <code class="code">ant webhelp</code> to build your document.</p></li></ol></li></ol></div></div><script type="text/javascript" src="common/main.js"></script><script type="text/javascript" src="common/splitterInit.js"></script><div class="navfooter"><hr></hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch02.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ch02.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ch02s02.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> </td></tr></table></div></div><div id="sidebar"><div id="leftnavigation" style="padding-top:3px;"><div id="tabs"><ul><li><a href="#treeDiv" style="outline:0;" tabindex="1"><span class="contentsTab">Contents</span></a></li><li><a href="#searchDiv" style="outline:0;" tabindex="1" onclick="doSearch()"><span class="searchTab">Search</span></a></li></ul><div id="treeDiv"><img src="common/images/loading.gif" alt="loading table of contents..." id="tocLoading" style="display:block;"></img><div id="ulTreeDiv" style="display:none"><ul id="tree" class="filetree"><li><span class="file"><a href="ch01.html" tabindex="1">Introduction</a></span></li><li><span class="file"><a href="ch02.html" tabindex="1">Using the package</a></span><ul><li id="webhelp-currentid"><span class="file"><a href="ch02s01.html" tabindex="1">Generating webhelp output using the Ant build.xml
|
---|
249 | file</a></span></li><li><span class="file"><a href="ch02s02.html" tabindex="1">Using and customizing the output</a></span><ul><li><span class="file"><a href="ch02s02s01.html" tabindex="1">Recommended Apache configurations</a></span></li></ul></li><li><span class="file"><a href="ch02s03.html" tabindex="1">Search indexing</a></span></li><li><span class="file"><a href="ch02s04.html" tabindex="1">Adding support for other (non-CJKV) languages</a></span></li><li><span class="file"><a href="ch02s05.html" tabindex="1">Adding images</a></span></li></ul></li><li><span class="file"><a href="ch03.html" tabindex="1">Developer Docs</a></span><ul><li><span class="file"><a href="ch03s01.html" tabindex="1">Design</a></span></li><li><span class="file"><a href="ch03s02.html" tabindex="1">Search</a></span><ul><li><span class="file"><a href="ch03s02s01.html" tabindex="1">New Stemmers</a></span></li></ul></li></ul></li><li><span class="file"><a href="ch04.html" tabindex="1">FAQ</a></span></li><li><span class="file"><a href="ch05.html" tabindex="1">Test section</a></span><ul><li><span class="file"><a href="ch05s01.html" tabindex="1">Some search words for testing</a></span></li><li><span class="file"><a href="ch05s02.html" tabindex="1">Some search words for testing (inflected)</a></span></li></ul></li><li><span class="file"><a href="ix01.html" tabindex="1">Index</a></span></li></ul></div></div><div id="searchDiv"><div id="search"><form onsubmit="Verifie(searchForm);return false" name="searchForm" class="searchForm"><div><input id="textToSearch" name="textToSearch" type="search" placeholder="Search" class="searchText" tabindex="1"></input> <input onclick="Verifie(searchForm)" type="button" class="searchButton" value="Go" id="doSearch" tabindex="1"></input></div></form></div><div id="searchResults"><center></center></div><p class="searchHighlight"><a href="#" onclick="toggleHighlight()">Search Highlighter (On/Off)</a></p></div></div></div></div></body></html>
|
---|