From: David Cramer Date: Thu, 19 Apr 2012 14:28:37 +0000 (+0000) Subject: Webhelp: updating docs. Ant version, install instructions, handling of images. X-Git-Tag: release/1.79.1~6^2~479 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=895b7c689b6016d99be9a41182676f8dc758cbe8;p=docbook-dsssl Webhelp: updating docs. Ant version, install instructions, handling of images. --- diff --git a/xsl/webhelp/build.properties b/xsl/webhelp/build.properties index fd57d0b92..23e099471 100644 --- a/xsl/webhelp/build.properties +++ b/xsl/webhelp/build.properties @@ -16,7 +16,7 @@ stylesheet-path=${ant.file.dir}/xsl/webhelp.xsl # 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/** +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 diff --git a/xsl/webhelp/template/content/images/sample.jpg b/xsl/webhelp/docsrc/images/sample.jpg similarity index 100% rename from xsl/webhelp/template/content/images/sample.jpg rename to xsl/webhelp/docsrc/images/sample.jpg diff --git a/xsl/webhelp/docsrc/readme.xml b/xsl/webhelp/docsrc/readme.xml index 12727f94f..c7d9d6333 100644 --- a/xsl/webhelp/docsrc/readme.xml +++ b/xsl/webhelp/docsrc/readme.xml @@ -97,7 +97,7 @@ url="http://code.google.com/soc/">Google Summer of Code project. - 2008-2011 + 2008-2012 Kasun Gajasinghe David Cramer @@ -111,7 +111,7 @@ Gajasinghe kasunbg AT gmail DOT com - September 2011 + January 2012 @@ -310,9 +310,8 @@ If necessary, install Apache - Ant 1.6.5 or higher. See Ant installation instructions. - 2.x gives brief instructions. + Ant 1.8.0 or higher. See Ant installation instructions. Unzip the Ant binary distribution to a convenient location on your system. For @@ -320,7 +319,7 @@ Set the environment variable ANT_HOME to the top-level Ant - directory. For example: c:\Program Files\apache-ant-1.7.1. + directory. For example: c:\Program Files\apache-ant-1.8.0. See How To Manage Environment Variables in Windows XP for information on setting environment variables. @@ -328,7 +327,7 @@ Add the Ant bin directory to your PATH. For - example: c:\Program Files\apache-ant-1.7.1\bin + example: c:\Program Files\apache-ant-1.8.0\bin Confirm that Ant is installed by typing the following at a command prompt: @@ -351,19 +350,21 @@ CLASSPATH. - + In a text editor, edit the build.properties file in the webhelp - directory and make the changes indicated by the - comments:# The path (relative to the build.xml file) to your input document. + directory and make the changes indicated by the comments. + You must set appropriate values for xslt-processor-classpath, + xercesImpl.jar, and xml-apis.jar. + +# The path (relative to the build.xml file) to your input document. # To use your own input document, create a build.xml file of your own # and import this build.xml. input-xml=docsrc/readme.xml @@ -388,13 +389,22 @@ stylesheet-path=${ant.file.dir}/xsl/webhelp.xsl # and uncomment this line. #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=/usr/share/java/saxon-6.5.5.jar +# Modify the follosing so that they point to your local +# copy of the jars indicated: +# * Saxon 6.5 jar +# * Xerces 2: xercesImpl.jar +# * xml-commons: xml-apis.jar +xslt-processor-classpath=/usr/share/java/saxon-6.5.5.jar +xercesImpl.jar=/usr/share/java/xercesImpl.jar +xml-apis.jar=/usr/share/java/xml-apis.jar # For non-ns version only, this validates the document # against a dtd. validate-against-dtd=true +# The extension for files to be indexed (html/htm/xhtml etc.) +html.extension=html + # Set this to false if you don't need a search tab. webhelp.include.search.tab=true @@ -403,7 +413,23 @@ webhelp.include.search.tab=true # stemmer, and punctuations that differs from language to language. # see the documentation for details. en=English, fr=French, de=German, # zh=Chinese, ja=Japanese etc. -webhelp.indexer.language=en +webhelp.indexer.language=en + +# Enables/Disables stemming +# Stemming allows better querying for the search +enable.stemming=true + +#Set the table of contents file. This file will not be indexed. +#toc.file=dummy.html + +#Used for adding branding specific contents to the html files. +#For example, the url docbook.org, Google Analytics id etc. +branding=docbook +brandname=DocBook + +# Set admon.graphics to 1 to user graphics for note, tip, etc. +admon.graphics=0 +suppress.footer.navigation=0 Test the package by running the command ant webhelp @@ -672,12 +698,13 @@ webhelp.indexer.language=en Adding images This section shows how to add images to WebHelp. For that, follow the simple procedure given. - Add all the images to template/content folder. + Put the images in a subdirectory of your source file directory. For example + docsrc/images. Then refer to those images from your docbook document. Following image is from webhelp/template/content/images/sample.jpg. The docbook code is shown + >webhelp/docsrs/images/sample.jpg. The docbook code is shown below.
@@ -701,6 +728,15 @@ webhelp.indexer.language=en </figure> + + The build.properties file controls what directories are copied + over from the source tree to the output + tree:# 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/** + @@ -965,5 +1001,5 @@ private String[] supportedLanguages= {"en", "de", "fr", "cn", "ja", "ko", FAQ - - \ No newline at end of file + +