Diff for Setting up the Eclipse Help Infocenter for publishing Dita content

Thu, 2010-08-26 17:51 by syeoThu, 2010-08-26 17:52 by syeo

Copy of the revision from Tue, 2010-06-29 11:17.

Copy of the revision from Thu, 2010-08-26 00:27.

Changes to Body
Line 1Line 1
-
<h1>Creating a Stand Alone Eclipse Infocenter for DITA</h1><p>The DITA Open Toolkit offers an actively maintained output for EclipseHelp. One of the features of this help system is that it can be deployed as astand alone help server.</p>This feature allows any valid DITA content to be served by a sophisticatedand well maintained help system, that is free for personal and commercialuse. Eclipse Help rivals commercial products in its stability and featureset.<p>The only cost (so far) that I have seen in deploying this system is thatit is designed for Eclipse and Java developers. Setup of the system is notobvious for someone who lives and works outside of the Eclipse universe, dueto the Eclipse documentation, which is oriented towards program development.Actual setup for documentation purposes is not difficult.</p><p>The purpose of this document is to minimize the pain of Eclipse Helpdeployment for those wishing to use the DITA Eclipse Help transformationtype.</p><p>This document is based on deployment of the current Eclipse stablerelease, 3.3.2, from February 21, 2008. If you use a different releaseof Eclipse, then file name references given in the following examplesmay not match your installation.</p><h2>The Eclipse Platform Runtime Binary Package</h2><p>The Eclipse Platform Runtime Binary package is available from the </p><p><a href="http://download.eclipse.org/eclipse/downloads/" target="_blank">Eclipse Download Page</a> <em>(on that page, click the link for the most recent release, then scroll down to find the Platform Runtime Binary package for your OS)</em> </p><p>Download the Platform Runtime Binary package that is appropriate for yourplatform.</p><p>Be sure to download the Platform Runtime Binary package, instead of theentire Eclipse development environment. The Platform Runtime Binary packageis only around 40M to download, whereas versions of the developmentenvironment can be 100M and up.</p><p>The Platform Runtime Binary package is distributed as an archive file, andcan be unarchived at any suitable location.</p><h2>Setting Up Your First DITA Document</h2><p>Render a DITA map and topic content using the &quot;eclipsehelp&quot; transformationtype. See the DITA User Guide for instructions on how to run a DITAtransformation.</p><p>After rendering, the output directory will contain an Eclipse Help plugin.Simply copy the entire output directory to:</p><p>&lt;where you installed the Eclipse Platform Runtime Binarypackage&gt;/eclipse/plugins</p><p>so that the copied output directory is beneath the plugins directory. Forexample, if you were to render the Dita Users' Guide, you could copy theoutput directory to:</p><p>&lt;where you installed the Eclipse Platform Runtime Binarypackage&gt;/eclipse/plugins/dita-uguide</p><h2>Starting the Eclipse Infocenter</h2><p>The Infocenter requires Sun Java 1.5. Start the Infocenter with thefollowing command:</p><pre>java -classpath&lt;eclipse-location&gt;/eclipse/plugins/org.eclipse.help.base_3.3.1.v20070813_33x.jarorg.eclipse.help.standalone.Infocenter -command start -eclipsehome&lt;eclipse-location&gt;/eclipse -port 8081</pre><p>where &lt;eclipse-location&gt; is the point where you installed theEclipse Platform Runtime Binary package.</p><p>NB: This command is run on a single line.</p><p>Point your favorite browser to http://localhost:8081/help/index.jsp</p><p>The Infocenter will appear, with bookmarks to the left, and an Eclipsewelcome page in the right frame.</p><p>The first few bookmarks will be Eclipse platform documentation. At thebottom of the bookmark list, you should see your Dita document.</p><p>To shut down the Infocenter, re-run the above command, but with theaugument &quot;-command shutdown&quot;</p><h2>Customization and Branding</h2><p>When you opened the Infocenter, you probably noticed how the help systemwas branded as an Eclipse product. To change the branding to suit your Ditadocumentation requires editing a set of configuration files.</p><p>&nbsp;</p><h3>Product Plugin </h3><p>The product plugin for an Information Center is the plugin ID that is defined in the config.ini file or via the  <em>-plugincustomization</em> option in the start command.  The product plugin contains the overrides for branding your particular Informaiton Center. </p><p>If you're interested in a 'cookbook recipe' for creating a product plugin using Eclipse, see [[An infocenter product plugin cookbook]].</p><p>&nbsp;</p><h3>Product Branding</h3><p>With your favorite text editor, open:</p><p>&lt;eclipse-location&gt;/eclipse/plugins/&lt;your_product_plugin&gt;/plugin.properties</p><p>Near the top of the file, you will see:</p><p>productName=Eclipse Platform</p><p>Change this to suit your Dita documentation.</p><p>To activate this variable, it may be necessary to erase the Eclipseruntime cache. As of this writing, the only way I know how to do this is todelete the cache by hand. After shutting down the Infocenter, go to:</p><p>&lt;eclipse-location&gt;/eclipse/configuration</p><p>Delete all directories that start with &quot;org.&quot;, being careful<strong>NOT</strong> to delete the file &quot;config.ini&quot;</p><p>The preferred way to link the controlling to your Elcipse envirment is via the configuration/config.ini.  At the bottom of the file add the following line:</p><p>eclipse.product=&lt;your_product_plugin_id&gt;.helpProduct </p><p>The <em>-plugincustomization </em>(location if product plugin containing the plugincustomization.ini file) is useful alternative if you are using the same Eclipse framework to serve up multiple Information Centers.  One issue to be aware of, in this case, is that the URL to the folder or jar file is harcoded in the start command. If the folder name or jar file name is updated, then the start command also needs to be updated. </p><p>&nbsp;</p><h3>Bookmarks</h3><p>To hide the Eclipse documentation listed in the bookmarks, edit thefile:</p><p>&lt;eclipse-location&gt;/eclipse/plugins/&lt;your_product_plugin&gt;/helpData.xml</p><p>Change the tocOrder tag to &quot;hidden&quot; to hide the Eclipse bookmarks. Thefile should look like:</p><pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;</pre><pre>&lt;extensions&gt;</pre><pre>&lt;hidden&gt;</pre><pre>&lt;toc id=&quot;/org.eclipse.platform.doc.user/toc.xml&quot;/&gt;</pre><pre>&lt;toc id=&quot;/org.eclipse.jdt.doc.user/toc.xml&quot;/&gt;</pre><pre>&lt;toc id=&quot;/org.eclipse.platform.doc.isv/toc.xml&quot;/&gt;</pre><pre>&lt;toc id=&quot;/org.eclipse.jdt.doc.isv/toc.xml&quot;/&gt;</pre><pre>&lt;toc id=&quot;/org.eclipse.pde.doc.user/toc.xml&quot;/&gt;</pre><pre>&lt;/hidden&gt;</pre><pre>&lt;/extensions&gt;</pre><p>If you have several Dita documents served by the Infocenter, they willappear in the bookmark list in a default order. If you would like to modifythe order, you can use the helpData.xml file to do so. This is done with thetocOrder element. For example:</p><pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;</pre><pre>&lt;extensions&gt;</pre><pre>&lt;tocOrder&gt;</pre><pre>&lt;toc id=&quot;/dita-userguide/DITA-userguide.xml&quot;/&gt;</pre><pre>&lt;toc id=&quot;/another-doc/DOC-document.xml&quot;/&gt;</pre><pre>&lt;/tocOrder&gt;</pre><pre>&lt;hidden&gt;</pre><pre>&lt;toc id=&quot;/org.eclipse.platform.doc.user/toc.xml&quot;/&gt;</pre><pre>&lt;toc id=&quot;/org.eclipse.jdt.doc.user/toc.xml&quot;/&gt;</pre><pre>&lt;toc id=&quot;/org.eclipse.platform.doc.isv/toc.xml&quot;/&gt;</pre><pre>&lt;toc id=&quot;/org.eclipse.jdt.doc.isv/toc.xml&quot;/&gt;</pre><pre>&lt;toc id=&quot;/org.eclipse.pde.doc.user/toc.xml&quot;/&gt;</pre><pre>&lt;/hidden&gt;</pre><pre>&lt;/extensions&gt;</pre><p>The content of the id attribute in the above example is not afilename reference. Instead, it is based on information contained inthe Dita document plugin configuration file. This file is named&quot;plugin.xml,&quot; and is located in the Dita eclipsehelp outputdirectory. For example, in the Dita User Guide output located at:</p><p>&lt;eclipse-location&gt;/eclipse/plugins/dita-ugide/plugin.xml</p><p>the content is:</p><pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;</pre><pre>&lt;plugin name=&quot;DITA User Guide&quot; id=&quot;dita-userguide&quot; version=&quot;1.0&quot; provider-name=&quot;DITA&quot;&gt;</pre><pre>&lt;extension point=&quot;org.eclipse.help.toc&quot;&gt;</pre><pre>&lt;toc file=&quot;DITA-userguide.xml&quot; primary=&quot;true&quot;/&gt;</pre><pre>&lt;/extension&gt;</pre><pre>&lt;extension point=&quot;org.eclipse.help.index&quot;&gt;</pre><pre>&lt;index file=&quot;index.xml&quot;/&gt;</pre><pre>&lt;/extension&gt;</pre><pre>&lt;!-- Product plugin extension point --&gt;</pre><pre>&lt;extension id=&quot;helpProduct&quot; point=&quot;org.eclipse.core.runtime.products&quot;&gt;</pre><pre>&lt;product name=&quot;%productName&quot; application=&quot;&quot;/&gt;</pre><pre>&lt;/extension&gt;</pre><pre>&lt;/plugin&gt;</pre><p>The first part of the extensions/tocOrder/toc/@id attribute inhelpData.xml is taken from the the id attribute in the plugin.xml file. Thesecond part of the extensions/tocOrder/toc/@id attribute, after the second /,is a filename reference. It is taken from the plugin.xml file atplugin/extension/toc/@file attribute.</p><p>In other words, the first part, between the first / and the second / isfrom the id attribute in plugin.xml. The second part is from the fileattribute in the toc element in plugin.xml</p><p>NB: In helpData.xml, the tocOrder element <strong>MUST</strong> precedethe hidden element.</p><h3>Product Banner</h3><p>This feature is optional, a matter of taste or policy. The banner, ifactivated, appears at the top of every help page, and reduces the displayarea of the page. It can be used to display such things as logos and customerservice information. It's a standard html page.</p><p>Banner configuration is done in a configuration file located in theplatform plugin directory:</p><p>&lt;eclipse-location&gt;/eclipse/plugins/&lt;your_product_plugin&gt;/plugin_customization.ini</p><p>The basic configuration syntax is:</p><p>&lt;plugin-name&gt;/&lt;parameter&gt; = &lt;value&gt;</p><p>To set a banner page that is located in the dita-uguide plugindirectory:</p><p>org.eclipse.help.base/banner = /dita-userguide/doc/banner.html</p><p>In this case, org.eclipse.help.base is the plugin that sets thisparameter, banner is the parameter that is being set, dita-userguideis the plugin id where the banner page is located (NOT the plugindirectory), doc is the directory within the plugin directory where thepage is located, and banner.html is the banner page itself.</p><p>As with the TOC configuration, it's important to remember todistinguish between the plugin id and the name of the plugindirectory.</p><p>To set the pixel height of the window where the banner will bedisplayed, add this parameter to plugin_customization.ini:</p><p>org.eclipse.help.base/banner_height = 80</p><p>To activate this configuration, shutdown and re-start theInfocenter.</p><h3>Home Page</h3><p>The home page is displayed when the user clicks on the home icon atthe top of the help display. It can be used to explain basic usage ofthe help system.</p><p>To set a home page that is located in the dita-uguide plugindirectory, add this parameter to your plugin_customization.ini:</p><pre>org.eclipse.help.base/help_home = dita-userguide/doc/help_home.html</pre><p>The syntax is the same as for the banner page parameter.</p><p>To activate this configuration, shutdown and re-start theInfocenter.</p>
+
<h1>Creating a Stand Alone Eclipse Infocenter for DITA</h1>
  +
<p>
  +
The DITA Open Toolkit offers an actively maintained output for Eclipse
  +
Help. One of the features of this help system is that it can be deployed as a
  +
stand alone help server.
  +
</p>
  +
This feature allows any valid DITA content to be served by a sophisticated
  +
and well maintained help system, that is free for personal and commercial
  +
use. Eclipse Help rivals commercial products in its stability and feature
  +
set.
  +
<p>
  +
The only cost (so far) that I have seen in deploying this system is that
  +
it is designed for Eclipse and Java developers. Setup of the system is not
  +
obvious for someone who lives and works outside of the Eclipse universe, due
  +
to the Eclipse documentation, which is oriented towards program development.
  +
Actual setup for documentation purposes is not difficult.
  +
</p>
  +
<p>
  +
The purpose of this document is to minimize the pain of Eclipse Help
  +
deployment for those wishing to use the DITA Eclipse Help transformation
  +
type.
  +
</p>
  +
<p>
  +
This document is based on deployment of the current Eclipse stable
  +
release, 3.3.2, from February 21, 2008. If you use a different release
  +
of Eclipse, then file name references given in the following examples
  +
may not match your installation.
  +
</p>
  +
<h2>The Eclipse Platform Runtime Binary Package</h2>
  +
<p>
  +
The Eclipse Platform Runtime Binary package is available from the
  +
</p>
  +
<p>
  +
<a href="http://download.eclipse.org/eclipse/downloads/" target="_blank">Eclipse Download Page</a> <em>(on that page, click the link for the most recent release, then scroll down to find the Platform Runtime Binary package for your OS)</em>
  +
</p>
  +
<p>
  +
Download the Platform Runtime Binary package that is appropriate for your
  +
platform.
  +
</p>
  +
<p>
  +
Be sure to download the Platform Runtime Binary package, instead of the
  +
entire Eclipse development environment. The Platform Runtime Binary package
  +
is only around 40M to download, whereas versions of the development
  +
environment can be 100M and up.
  +
</p>
  +
<p>
  +
The Platform Runtime Binary package is distributed as an archive file, and
  +
can be unarchived at any suitable location.
  +
</p>
  +
<h2>Setting Up Your First DITA Document</h2>
  +
<p>
  +
Render a DITA map and topic content using the &quot;eclipsehelp&quot; transformation
  +
type. See the DITA User Guide for instructions on how to run a DITA
  +
transformation.
  +
</p>
  +
<p>
  +
After rendering, the output directory will contain an Eclipse Help plugin.
  +
Simply copy the entire output directory to:
  +
</p>
  +
<p>
  +
&lt;where you installed the Eclipse Platform Runtime Binary
  +
package&gt;/eclipse/plugins
  +
</p>
  +
<p>
  +
so that the copied output directory is beneath the plugins directory. For
  +
example, if you were to render the Dita Users' Guide, you could copy the
  +
output directory to:
  +
</p>
  +
<p>
  +
&lt;where you installed the Eclipse Platform Runtime Binary
  +
package&gt;/eclipse/plugins/dita-uguide
  +
</p>
  +
<h2>Starting the Eclipse Infocenter</h2>
  +
<p>
  +
The Infocenter requires Sun Java 1.5. Start the Infocenter with the
  +
following command:
  +
</p>
  +
<p>
  +
java -classpath
  +
&lt;eclipse-location&gt;/eclipse/plugins/org.eclipse.help.base_3.3.1.v20070813_33x.jar
  +
org.eclipse.help.standalone.Infocenter -command start -eclipsehome
  +
&lt;eclipse-location&gt;/eclipse -port 8081
  +
</p>
  +
<p>
  +
where &lt;eclipse-location&gt; is the point where you installed the
  +
Eclipse Platform Runtime Binary package.
  +
</p>
  +
<p>
  +
NB: This command is run on a single line.
  +
</p>
  +
<p>
  +
Point your favorite browser to http://localhost:8081/help/index.jsp
  +
</p>
  +
<p>
  +
The Infocenter will appear, with bookmarks to the left, and an Eclipse
  +
welcome page in the right frame.
  +
</p>
  +
<p>
  +
The first few bookmarks will be Eclipse platform documentation. At the
  +
bottom of the bookmark list, you should see your Dita document.
  +
</p>
  +
<p>
  +
To shut down the Infocenter, re-run the above command, but with the
  +
augument &quot;-command shutdown&quot;
  +
</p>
  +
<h2>Customization and Branding</h2>
  +
<p>
  +
When you opened the Infocenter, you probably noticed how the help system
  +
was branded as an Eclipse product. To change the branding to suit your Dita
  +
documentation requires editing a set of configuration files.
  +
</p>
  +
<p>
  +
&nbsp;
  +
</p>
  +
<h3>Product Plugin </h3>
  +
<p>
  +
The product plugin for an Information Center is the plugin ID that is defined in the config.ini file or via the  <em>-plugincustomization</em> option in the start command.  The product plugin contains the overrides for branding your particular Informaiton Center.
  +
</p>
  +
<p>
  +
If you're interested in a 'cookbook recipe' for creating a product plugin using Eclipse, see [[An infocenter product plugin cookbook]].
  +
</p>
  +
<p>
  +
&nbsp;
  +
</p>
  +
<h3>Product Branding</h3>
  +
<p>
  +
With your favorite text editor, open:
  +
</p>
  +
<p>
  +
&lt;eclipse-location&gt;/eclipse/plugins/&lt;your_product_plugin&gt;/plugin.properties
  +
</p>
  +
<p>
  +
Near the top of the file, you will see:
  +
</p>
  +
<p>
  +
productName=Eclipse Platform
  +
</p>
  +
<p>
  +
Change this to suit your Dita documentation.
  +
</p>
  +
<p>
  +
To activate this variable, it may be necessary to erase the Eclipse
  +
runtime cache. As of this writing, the only way I know how to do this is to
  +
delete the cache by hand. After shutting down the Infocenter, go to:
  +
</p>
  +
<p>
  +
&lt;eclipse-location&gt;/eclipse/configuration
  +
</p>
  +
<p>
  +
Delete all directories that start with &quot;org.&quot;, being careful
  +
<strong>NOT</strong> to delete the file &quot;config.ini&quot;
  +
</p>
  +
<p>
  +
The preferred way to link the controlling to your Elcipse envirment is via the configuration/config.ini.  At the bottom of the file add the following line:
  +
</p>
  +
<p>
  +
eclipse.product=&lt;your_product_plugin_id&gt;.helpProduct
  +
</p>
  +
<p>
  +
The <em>-plugincustomization </em>(location if product plugin containing the plugincustomization.ini file) is useful alternative if you are using the same Eclipse framework to serve up multiple Information Centers.  One issue to be aware of, in this case, is that the URL to the folder or jar file is harcoded in the start command. If the folder name or jar file name is updated, then the start command also needs to be updated.
  +
</p>
  +
<p>
  +
&nbsp;
  +
</p>
  +
<h3>Bookmarks</h3>
  +
<p>
  +
To hide the Eclipse documentation listed in the bookmarks, edit the
  +
file:
  +
</p>
  +
<p>
  +
&lt;eclipse-location&gt;/eclipse/plugins/&lt;your_product_plugin&gt;/helpData.xml
  +
</p>
  +
<p>
  +
Change the tocOrder tag to &quot;hidden&quot; to hide the Eclipse bookmarks. The
  +
file should look like:
  +
</p>
  +
<p>
  +
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
  +
</p>
  +
<p>
  +
&lt;extensions&gt;
  +
</p>
  +
<p>
  +
&lt;hidden&gt;
  +
</p>
  +
<p>
  +
&lt;toc id=&quot;/org.eclipse.platform.doc.user/toc.xml&quot;/&gt;
  +
</p>
  +
<p>
  +
&lt;toc id=&quot;/org.eclipse.jdt.doc.user/toc.xml&quot;/&gt;
  +
</p>
  +
<p>
  +
&lt;toc id=&quot;/org.eclipse.platform.doc.isv/toc.xml&quot;/&gt;
  +
</p>
  +
<p>
  +
&lt;toc id=&quot;/org.eclipse.jdt.doc.isv/toc.xml&quot;/&gt;
  +
</p>
  +
<p>
  +
&lt;toc id=&quot;/org.eclipse.pde.doc.user/toc.xml&quot;/&gt;
  +
</p>
  +
<p>
  +
&lt;/hidden&gt;
  +
</p>
  +
<p>
  +
&lt;/extensions&gt;
  +
</p>
  +
<p>
  +
If you have several Dita documents served by the Infocenter, they will
  +
appear in the bookmark list in a default order. If you would like to modify
  +
the order, you can use the helpData.xml file to do so. This is done with the
  +
tocOrder element. For example:
  +
</p>
  +
<p>
  +
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
  +
</p>
  +
<p>
  +
&lt;extensions&gt;
  +
</p>
  +
<p>
  +
&lt;tocOrder&gt;
  +
</p>
  +
<p>
  +
&lt;toc id=&quot;/dita-userguide/DITA-userguide.xml&quot;/&gt;
  +
</p>
  +
<p>
  +
&lt;toc id=&quot;/another-doc/DOC-document.xml&quot;/&gt;
  +
</p>
  +
<p>
  +
&lt;/tocOrder&gt;
  +
</p>
  +
<p>
  +
&lt;hidden&gt;
  +
</p>
  +
<p>
  +
&lt;toc id=&quot;/org.eclipse.platform.doc.user/toc.xml&quot;/&gt;
  +
</p>
  +
<p>
  +
&lt;toc id=&quot;/org.eclipse.jdt.doc.user/toc.xml&quot;/&gt;
  +
</p>
  +
<p>
  +
&lt;toc id=&quot;/org.eclipse.platform.doc.isv/toc.xml&quot;/&gt;
  +
</p>
  +
<p>
  +
&lt;toc id=&quot;/org.eclipse.jdt.doc.isv/toc.xml&quot;/&gt;
  +
</p>
  +
<p>
  +
&lt;toc id=&quot;/org.eclipse.pde.doc.user/toc.xml&quot;/&gt;
  +
</p>
  +
<p>
  +
&lt;/hidden&gt;
  +
</p>
  +
<p>
  +
&lt;/extensions&gt;
  +
</p>
  +
<p>
  +
The content of the id attribute in the above example is not a
  +
filename reference. Instead, it is based on information contained in
  +
the Dita document plugin configuration file. This file is named
  +
&quot;plugin.xml,&quot; and is located in the Dita eclipsehelp output
  +
directory. For example, in the Dita User Guide output located at:
  +
</p>
  +
<p>
  +
&lt;eclipse-location&gt;/eclipse/plugins/dita-ugide/plugin.xml
  +
</p>
  +
<p>
  +
the content is:
  +
</p>
  +
<p>
  +
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
  +
</p>
  +
<p>
  +
&lt;plugin name=&quot;DITA User Guide&quot; id=&quot;dita-userguide&quot; version=&quot;1.0&quot; provider-name=&quot;DITA&quot;&gt;
  +
</p>
  +
<p>
  +
&lt;extension point=&quot;org.eclipse.help.toc&quot;&gt;
  +
</p>
  +
<p>
  +
&lt;toc file=&quot;DITA-userguide.xml&quot; primary=&quot;true&quot;/&gt;
  +
</p>
  +
<p>
  +
&lt;/extension&gt;
  +
</p>
  +
<p>
  +
&lt;extension point=&quot;org.eclipse.help.index&quot;&gt;
  +
</p>
  +
<p>
  +
&lt;index file=&quot;index.xml&quot;/&gt;
  +
</p>
  +
<p>
  +
&lt;/extension&gt;
  +
</p>
  +
<p>
  +
&lt;!-- Product plugin extension point --&gt;
  +
</p>
  +
<p>
  +
&lt;extension id=&quot;helpProduct&quot; point=&quot;org.eclipse.core.runtime.products&quot;&gt;
  +
</p>
  +
<p>
  +
&lt;product name=&quot;%productName&quot; application=&quot;&quot;/&gt;
  +
</p>
  +
<p>
  +
&lt;/extension&gt;
  +
</p>
  +
<p>
  +
&lt;/plugin&gt;
  +
</p>
  +
<p>
  +
The first part of the extensions/tocOrder/toc/@id attribute in
  +
helpData.xml is taken from the the id attribute in the plugin.xml file. The
  +
second part of the extensions/tocOrder/toc/@id attribute, after the second /,
  +
is a filename reference. It is taken from the plugin.xml file at
  +
plugin/extension/toc/@file attribute.
  +
</p>
  +
<p>
  +
In other words, the first part, between the first / and the second / is
  +
from the id attribute in plugin.xml. The second part is from the file
  +
attribute in the toc element in plugin.xml
  +
</p>
  +
<p>
  +
NB: In helpData.xml, the tocOrder element <strong>MUST</strong> precede
  +
the hidden element.
  +
</p>
  +
<h3>Product Banner</h3>
  +
<p>
  +
This feature is optional, a matter of taste or policy. The banner, if
  +
activated, appears at the top of every help page, and reduces the display
  +
area of the page. It can be used to display such things as logos and customer
  +
service information. It's a standard html page.
  +
</p>
  +
<p>
  +
Banner configuration is done in a configuration file located in the
  +
platform plugin directory:
  +
</p>
  +
<p>
  +
&lt;eclipse-location&gt;/eclipse/plugins/&lt;your_product_plugin&gt;/plugin_customization.ini
  +
</p>
  +
<p>
  +
The basic configuration syntax is:
  +
</p>
  +
<p>
  +
&lt;plugin-name&gt;/&lt;parameter&gt; = &lt;value&gt;
  +
</p>
  +
<p>
  +
To set a banner page that is located in the dita-uguide plugin
  +
directory:
  +
</p>
  +
<p>
  +
org.eclipse.help.base/banner = /dita-userguide/doc/banner.html
  +
</p>
  +
<p>
  +
In this case, org.eclipse.help.base is the plugin that sets this
  +
parameter, banner is the parameter that is being set, dita-userguide
  +
is the plugin id where the banner page is located (NOT the plugin
  +
directory), doc is the directory within the plugin directory where the
  +
page is located, and banner.html is the banner page itself.
  +
</p>
  +
<p>
  +
As with the TOC configuration, it's important to remember to
  +
distinguish between the plugin id and the name of the plugin
  +
directory.
  +
</p>
  +
<p>
  +
To set the pixel height of the window where the banner will be
  +
displayed, add this parameter to plugin_customization.ini:
  +
</p>
  +
<p>
  +
org.eclipse.help.base/banner_height = 80
  +
</p>
  +
<p>
  +
To activate this configuration, shutdown and re-start the
  +
Infocenter.
  +
</p>
  +
<h3>Home Page</h3>
  +
<p>
  +
The home page is displayed when the user clicks on the home icon at
  +
the top of the help display. It can be used to explain basic usage of
  +
the help system.
  +
</p>
  +
<p>
  +
To set a home page that is located in the dita-uguide plugin
  +
directory, add this parameter to your plugin_customization.ini:
  +
</p>
  +
<p>
  +
org.eclipse.help.base/help_home = dita-userguide/doc/help_home.html
  +
</p>
  +
<p>
  +
The syntax is the same as for the banner page parameter.
  +
</p>
  +
<p>
  +
To activate this configuration, shutdown and re-start the
  +
Infocenter.
  +
</p>
  +
 
Current revision:

Setting up the Eclipse Help Infocenter for publishing Dita content

Creating a Stand Alone Eclipse Infocenter for DITA

The DITA Open Toolkit offers an actively maintained output for Eclipse Help. One of the features of this help system is that it can be deployed as a stand alone help server.

This feature allows any valid DITA content to be served by a sophisticated and well maintained help system, that is free for personal and commercial use. Eclipse Help rivals commercial products in its stability and feature set.

The only cost (so far) that I have seen in deploying this system is that it is designed for Eclipse and Java developers. Setup of the system is not obvious for someone who lives and works outside of the Eclipse universe, due to the Eclipse documentation, which is oriented towards program development. Actual setup for documentation purposes is not difficult.

The purpose of this document is to minimize the pain of Eclipse Help deployment for those wishing to use the DITA Eclipse Help transformation type.

This document is based on deployment of the current Eclipse stable release, 3.3.2, from February 21, 2008. If you use a different release of Eclipse, then file name references given in the following examples may not match your installation.

The Eclipse Platform Runtime Binary Package

The Eclipse Platform Runtime Binary package is available from the

Eclipse Download Page (on that page, click the link for the most recent release, then scroll down to find the Platform Runtime Binary package for your OS)

Download the Platform Runtime Binary package that is appropriate for your platform.

Be sure to download the Platform Runtime Binary package, instead of the entire Eclipse development environment. The Platform Runtime Binary package is only around 40M to download, whereas versions of the development environment can be 100M and up.

The Platform Runtime Binary package is distributed as an archive file, and can be unarchived at any suitable location.

Setting Up Your First DITA Document

Render a DITA map and topic content using the "eclipsehelp" transformation type. See the DITA User Guide for instructions on how to run a DITA transformation.

After rendering, the output directory will contain an Eclipse Help plugin. Simply copy the entire output directory to:

<where you installed the Eclipse Platform Runtime Binary package>/eclipse/plugins

so that the copied output directory is beneath the plugins directory. For example, if you were to render the Dita Users' Guide, you could copy the output directory to:

<where you installed the Eclipse Platform Runtime Binary package>/eclipse/plugins/dita-uguide

Starting the Eclipse Infocenter

The Infocenter requires Sun Java 1.5. Start the Infocenter with the following command:

java -classpath <eclipse-location>/eclipse/plugins/org.eclipse.help.base_3.3.1.v20070813_33x.jar org.eclipse.help.standalone.Infocenter -command start -eclipsehome <eclipse-location>/eclipse -port 8081

where <eclipse-location> is the point where you installed the Eclipse Platform Runtime Binary package.

NB: This command is run on a single line.

Point your favorite browser to http://localhost:8081/help/index.jsp

The Infocenter will appear, with bookmarks to the left, and an Eclipse welcome page in the right frame.

The first few bookmarks will be Eclipse platform documentation. At the bottom of the bookmark list, you should see your Dita document.

To shut down the Infocenter, re-run the above command, but with the augument "-command shutdown"

Customization and Branding

When you opened the Infocenter, you probably noticed how the help system was branded as an Eclipse product. To change the branding to suit your Dita documentation requires editing a set of configuration files.

 

Product Plugin

The product plugin for an Information Center is the plugin ID that is defined in the config.ini file or via the  -plugincustomization option in the start command.  The product plugin contains the overrides for branding your particular Informaiton Center.

If you're interested in a 'cookbook recipe' for creating a product plugin using Eclipse, see An infocenter product plugin cookbook.

 

Product Branding

With your favorite text editor, open:

<eclipse-location>/eclipse/plugins/<your_product_plugin>/plugin.properties

Near the top of the file, you will see:

productName=Eclipse Platform

Change this to suit your Dita documentation.

To activate this variable, it may be necessary to erase the Eclipse runtime cache. As of this writing, the only way I know how to do this is to delete the cache by hand. After shutting down the Infocenter, go to:

<eclipse-location>/eclipse/configuration

Delete all directories that start with "org.", being careful NOT to delete the file "config.ini"

The preferred way to link the controlling to your Elcipse envirment is via the configuration/config.ini.  At the bottom of the file add the following line:

eclipse.product=<your_product_plugin_id>.helpProduct

The -plugincustomization (location if product plugin containing the plugincustomization.ini file) is useful alternative if you are using the same Eclipse framework to serve up multiple Information Centers.  One issue to be aware of, in this case, is that the URL to the folder or jar file is harcoded in the start command. If the folder name or jar file name is updated, then the start command also needs to be updated.

 

Bookmarks

To hide the Eclipse documentation listed in the bookmarks, edit the file:

<eclipse-location>/eclipse/plugins/<your_product_plugin>/helpData.xml

Change the tocOrder tag to "hidden" to hide the Eclipse bookmarks. The file should look like:

<?xml version="1.0" encoding="utf-8"?>

<extensions>

<hidden>

<toc id="/org.eclipse.platform.doc.user/toc.xml"/>

<toc id="/org.eclipse.jdt.doc.user/toc.xml"/>

<toc id="/org.eclipse.platform.doc.isv/toc.xml"/>

<toc id="/org.eclipse.jdt.doc.isv/toc.xml"/>

<toc id="/org.eclipse.pde.doc.user/toc.xml"/>

</hidden>

</extensions>

If you have several Dita documents served by the Infocenter, they will appear in the bookmark list in a default order. If you would like to modify the order, you can use the helpData.xml file to do so. This is done with the tocOrder element. For example:

<?xml version="1.0" encoding="utf-8"?>

<extensions>

<tocOrder>

<toc id="/dita-userguide/DITA-userguide.xml"/>

<toc id="/another-doc/DOC-document.xml"/>

</tocOrder>

<hidden>

<toc id="/org.eclipse.platform.doc.user/toc.xml"/>

<toc id="/org.eclipse.jdt.doc.user/toc.xml"/>

<toc id="/org.eclipse.platform.doc.isv/toc.xml"/>

<toc id="/org.eclipse.jdt.doc.isv/toc.xml"/>

<toc id="/org.eclipse.pde.doc.user/toc.xml"/>

</hidden>

</extensions>

The content of the id attribute in the above example is not a filename reference. Instead, it is based on information contained in the Dita document plugin configuration file. This file is named "plugin.xml," and is located in the Dita eclipsehelp output directory. For example, in the Dita User Guide output located at:

<eclipse-location>/eclipse/plugins/dita-ugide/plugin.xml

the content is:

<?xml version="1.0" encoding="utf-8"?>

<plugin name="DITA User Guide" id="dita-userguide" version="1.0" provider-name="DITA">

<extension point="org.eclipse.help.toc">

<toc file="DITA-userguide.xml" primary="true"/>

</extension>

<extension point="org.eclipse.help.index">

<index file="index.xml"/>

</extension>

<!-- Product plugin extension point -->

<extension id="helpProduct" point="org.eclipse.core.runtime.products">

<product name="%productName" application=""/>

</extension>

</plugin>

The first part of the extensions/tocOrder/toc/@id attribute in helpData.xml is taken from the the id attribute in the plugin.xml file. The second part of the extensions/tocOrder/toc/@id attribute, after the second /, is a filename reference. It is taken from the plugin.xml file at plugin/extension/toc/@file attribute.

In other words, the first part, between the first / and the second / is from the id attribute in plugin.xml. The second part is from the file attribute in the toc element in plugin.xml

NB: In helpData.xml, the tocOrder element MUST precede the hidden element.

Product Banner

This feature is optional, a matter of taste or policy. The banner, if activated, appears at the top of every help page, and reduces the display area of the page. It can be used to display such things as logos and customer service information. It's a standard html page.

Banner configuration is done in a configuration file located in the platform plugin directory:

<eclipse-location>/eclipse/plugins/<your_product_plugin>/plugin_customization.ini

The basic configuration syntax is:

<plugin-name>/<parameter> = <value>

To set a banner page that is located in the dita-uguide plugin directory:

org.eclipse.help.base/banner = /dita-userguide/doc/banner.html

In this case, org.eclipse.help.base is the plugin that sets this parameter, banner is the parameter that is being set, dita-userguide is the plugin id where the banner page is located (NOT the plugin directory), doc is the directory within the plugin directory where the page is located, and banner.html is the banner page itself.

As with the TOC configuration, it's important to remember to distinguish between the plugin id and the name of the plugin directory.

To set the pixel height of the window where the banner will be displayed, add this parameter to plugin_customization.ini:

org.eclipse.help.base/banner_height = 80

To activate this configuration, shutdown and re-start the Infocenter.

Home Page

The home page is displayed when the user clicks on the home icon at the top of the help display. It can be used to explain basic usage of the help system.

To set a home page that is located in the dita-uguide plugin directory, add this parameter to your plugin_customization.ini:

org.eclipse.help.base/help_home = dita-userguide/doc/help_home.html

The syntax is the same as for the banner page parameter.

To activate this configuration, shutdown and re-start the Infocenter.

XML.org Focus Areas: BPEL | DITA | ebXML | IDtrust | OpenDocument | SAML | UBL | UDDI
OASIS sites: OASIS | Cover Pages | XML.org | AMQP | CGM Open | eGov | Emergency | IDtrust | LegalXML | Open CSA | OSLC | WS-I