input-xml=docsrc/readme.xml
+output-dir=doc
stylesheet-path=xsl/webhelp.xsl
-# Output directory
-base-dir=doc
+# If your document has image directories that need to be copied
+# to the output directory, you can list patterns here.
+# See the Ant documentation for fileset for documentation
+# on patterns.
+#input-images-dirs=images/** figures/** graphics/**
+# By default, the ant script assumes your images are stored
+# in the same directory as the input-xml. If you store your
+# image directories in another directory, specify it here.
+#input-images-basedir=/path/to/image/location
# Modify this so that it points to your copy of the Saxon 6.5 jar.
xslt-processor-classpath=c:/workhead/export/saxon/6.5/lib/saxon.jar
# Download xml-commons-resolver from http://xml.apache.org/commons/dist/
# and add it to your CLASSPATH. Then use the following property to point
# to your docbook xsl stylesheets' catalog
-docbook-xsl-catalog=/media/DATA/ACADEMIC/GSOC/docbook/repository/docbook/trunk/maven/docbook-xsl/target/xsltmp/docbook-xsl-1.75.2/catalog.xml
+docbook-xsl-catalog=c:/gsoc2010/docbook-xsl-1.75.2/catalog.xml
+#docbook-xsl-catalog=/media/DATA/ACADEMIC/GSOC/docbook/repository/docbook/trunk/maven/docbook-xsl/target/xsltmp/docbook-xsl-1.75.2/catalog.xml
# If you wish to have the ant script validate the document before
# building it, set this property to the location
# of your DocBook DTD. The sample document is
# a DocBook 4.5 document and uncomment the line validate=true.
-docbookx.dtd=file:///media/DATA/ACADEMIC/GSOC/docbook/repository/docbook/trunk/defguide/en/schema/docbookx.dtd
+docbookx.dtd=c:/workhead/export/DocBookDTD/4.5/docbookx.dtd
+#docbookx.dtd=file:///media/DATA/ACADEMIC/GSOC/docbook/repository/docbook/trunk/defguide/en/schema/docbookx.dtd
validate=true
# Set this to true if you don't need a search tab.
exclude.search.from.chunked.html=false
-#indexer-language is used to tell the search indexer which language the docbook is written.
-#This will be used to identify the correct stemmer, and punctuations that differs from language to language.
-#see the documentation for details. en=English, de=German, cn=Chinese, jp=Japanese etc.
-#Country codes are available at: http://www.uspto.gov/patft/help/helpctry.htm
+# indexer-language is used to tell the search indexer which language
+# the docbook is written. This will be used to identify the correct
+# stemmer, and punctuations that differs from language to language.
+# see the documentation for details. en=English, de=German,
+# cn=Chinese, jp=Japanese etc. Country codes are available at:
+# http://www.uspto.gov/patft/help/helpctry.htm
indexer-language=en
<target name="chunk" depends="clean">
- <mkdir dir="${base-dir}"/>
+ <mkdir dir="${output-dir}"/>
<xslt
in="${input-xml}"
- out="${base-dir}/dummy.html"
+ out="${output-dir}/dummy.html"
style="${ant.file.dir}/xsl/webhelp.xsl"
scanincludeddirectories="false"
classpath="${xslt-processor-classpath}">
<param name="exclude.search.from.chunked.html" expression="${exclude.search.from.chunked.html}"
if="exclude.search.from.chunked.html"/>
<param name="output_file_name" expression="${output_file_name}"/>
- <param name="webhelp.base.dir" expression="${base-dir}" if="base-dir"/>
+ <param name="webhelp.base.dir" expression="${output-dir}" if="output-dir"/>
<param name="indexer.language" expression="${indexer-language}" if="indexer-language"/>
<param name="chunk.frameset.start.filename" expression="${chunk.frameset.start.filename}"
if="chunk.frameset.start.filename"/>
</xslt>
- <delete file="${base-dir}/dummy.html"/>
+ <delete file="${output-dir}/dummy.html"/>
<!-- Copy common content such as js files of tree, css etc. to template folder. They will be copied to doc folder. They are NOT page specific! -->
- <copy todir="${base-dir}">
+ <copy todir="${output-dir}">
+ <fileset dir="${ant.file.dir}/template">
+ <include name="**/*"/>
+ <exclude name="**/content/search/**"/>
+ </fileset>
+ </copy>
+
+ <!-- Very simple-minded copy to handle the source document's images -->
+ <!-- TODO: Look at html help code that produces a manifest file...list of images -->
+ <!-- Customize webhelp.xsl to produce ant file to copy images actually used? -->
+ <dirname property="input-images-basedir" file="${input-xml}"/>
+ <copy todir="${output-dir}/content" failonerror="false">
+ <fileset dir="${input-images-basedir}" includes="${input-images-dirs}" />
+ </copy>
+ </target>
+
+ <target name="index" unless="skip-search-indexing">
+
+ <copy todir="${output-dir}">
<fileset dir="${ant.file.dir}/template">
<include name="**/*"/>
<exclude name="**/content/search/*.props"/>
+ <exclude name="**/content/search/stemmers/*"/>
</fileset>
</copy>
- <!-- We separate this out so we only copy the stopwords list for the indexer language -->
- <copy todir="${base-dir}">
+
+ <!-- We separate this out so we only copy the stopwords list and stemmer for the indexer language -->
+ <copy todir="${output-dir}">
<fileset dir="${ant.file.dir}/template">
<include name="**/content/search/default.props"/>
<include name="**/content/search/punctuation.props"/>
<include name="**/content/search/${indexer-language}*.props"/>
+ <include name="**/content/search/stemmers/${indexer-language}_stemmer.js"/>
</fileset>
</copy>
-
- <!--Deletes all the stemmers that are copied to doc/ folder. Then, adds only the needed stemmer-->
- <delete dir="${base-dir}/content/search/stemmers"/>
- <copy todir="doc/content/search/stemmers/"
- file="template/content/search/stemmers/${indexer-language}_stemmer.js"/>
-
- <!-- Very simple-minded copy to handle the source document's images -->
- <!-- TODO: Look at html help code that produces a manifest file...list of images -->
- <!-- Customize webhelp.xsl to produce ant file to copy images used? -->
- <copy todir="${base-dir}/content" failonerror="false">
- <fileset dir="${input-images-dir}"/>
- </copy>
-
- </target>
-
- <target name="index" unless="skip-search-indexing">
<path id="nw-cms.jar.path">
<pathelement location="${ant.file.dir}/indexer/lib/nw-cms.jar"/>
<classpath refid="nw-cms.jar.path"/>
</taskdef>
- <echo>Indexing html files in ${base-dir}/content</echo>
+ <echo>Indexing html files in ${output-dir}/content</echo>
- <indexertask htmldir="${base-dir}/content" indexerLanguage="${indexer-language}"/>
+ <indexertask htmldir="${output-dir}/content" indexerLanguage="${indexer-language}"/>
<delete>
- <fileset dir="${base-dir}/content/search" includes="*.props"/>
+ <fileset dir="${output-dir}/content/search" includes="*.props"/>
</delete>
<delete file="xx.html"/>
</target>
<target name="clean">
- <delete dir="${base-dir}"/>
+ <delete dir="${output-dir}"/>
</target>
<target name="help">
<echo>Usage:</echo>
- <echo>doc: Generate the documentation in the doc dir and index it.</echo>
- <echo>chunk: Generate the frameset.</echo>
+ <echo>webhelp: Generate the document in webhelp format.</echo>
<echo>index: Index the content.</echo>
<echo>build-indexer: Rebuilds the indexer.</echo>
</target>