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

Sun, 2008-03-16 16:08 by tomedSun, 2008-03-16 16:28 by tomed

Setting up an Eclipse Infocenter

Attempting to display pre-formatted code.

Changes to Body
Line 1Line 1
-
&lt;h1&gt;Creating a Stand Alone Eclipse Infocenter for Dita&lt;/h1&gt;<br />
+
<h1>Creating a Stand Alone Eclipse Infocenter for Dita</h1>
-
<br />
+
<p>
-
&lt;p&gt;The Dita Open Toolkit offers an actively maintained output for Eclipse<br />
+
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<br />
+
Help. One of the features of this help system is that it can be deployed as a
-
stand alone help server.&lt;/p&gt;<br />
+
stand alone help server.
-
<br />
+
</p>
-
&lt;p&gt;This feature allows any valid Dita content to be served by a sophisticated<br />
+
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<br />
+
and well maintained help system, that is free for personal and commercial
-
use. Eclipse Help rivals commercial products in its stability and feature<br />
+
use. Eclipse Help rivals commercial products in its stability and feature
-
set.&lt;/p&gt;<br />
+
set.
-
<br />
+
<p>
-
&lt;p&gt;The only cost (so far) that I have seen in deploying this system is that<br />
+
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<br />
+
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<br />
+
obvious for someone who lives and works outside of the Eclipse universe, due
-
to the Eclipse documentation, which is oriented towards program development.<br />
+
to the Eclipse documentation, which is oriented towards program development.
-
Actual setup for documentation purposes is not difficult.&lt;/p&gt;<br />
+
Actual setup for documentation purposes is not difficult.
-
<br />
+
</p>
-
&lt;p&gt;The purpose of this document is to minimize the pain of Eclipse Help<br />
+
<p>
-
deployment for those wishing to use the Dita Eclipse Help transformation<br />
+
The purpose of this document is to minimize the pain of Eclipse Help
-
type.&lt;/p&gt;<br />
+
deployment for those wishing to use the Dita Eclipse Help transformation
-
<br />
+
type.
-
&lt;p&gt;This document is based on deployment of the current Eclipse stable<br />
+
</p>
-
release, 3.3.2, from February 21, 2008. If you use a different release<br />
+
<p>
-
of Eclipse, then file name references given in the following examples<br />
+
This document is based on deployment of the current Eclipse stable
-
may not match your installation.&lt;/p&gt;<br />
+
release, 3.3.2, from February 21, 2008. If you use a different release
-
<br />
+
of Eclipse, then file name references given in the following examples
-
&lt;h2&gt;The Eclipse Platform Runtime Binary Package&lt;/h2&gt;<br />
+
may not match your installation.
-
<br />
+
</p>
-
&lt;p&gt;The Eclipse Platform Runtime Binary package is available from the &lt;/p&gt;<br />
+
<h2>The Eclipse Platform Runtime Binary Package</h2>
-
<br />
+
<p>
-
&lt;p&gt;&lt;a<br />
+
The Eclipse Platform Runtime Binary package is available from the
-
href=&quot;http://download.eclipse.org/eclipse/downloads/drops/R-3.3.2-200802211800/index.php&quot;&gt;Eclipse 3.3.2 Download Page&lt;/a&gt;&lt;/p&gt;<br />
+
</p>
-
<br />
+
<p>
-
&lt;p&gt;Download the Platform Runtime Binary package that is appropriate for your<br />
+
<a href="http://download.eclipse.org/eclipse/downloads/drops/R-3.3.2-200802211800/index.php">Eclipse
-
platform.&lt;/p&gt;<br />
+
3.3.2 Download Page</a>
-
<br />
+
</p>
-
&lt;p&gt;Be sure to download the Platform Runtime Binary package, instead of the<br />
+
<p>
-
entire Eclipse development environment. The Platform Runtime Binary package<br />
+
Download the Platform Runtime Binary package that is appropriate for your
-
is only around 40M to download, whereas versions of the development<br />
+
platform.
-
environment can be 100M and up.&lt;/p&gt;<br />
+
</p>
-
<br />
+
<p>
-
&lt;p&gt;The Platform Runtime Binary package is distributed as an archive file, and<br />
+
Be sure to download the Platform Runtime Binary package, instead of the
-
can be unarchived at any suitable location.&lt;/p&gt;<br />
+
entire Eclipse development environment. The Platform Runtime Binary package
-
<br />
+
is only around 40M to download, whereas versions of the development
-
&lt;h2&gt;Setting Up Your First Dita Document&lt;/h2&gt;<br />
+
environment can be 100M and up.
-
<br />
+
</p>
-
&lt;p&gt;Render a Dita map and topic content using the &quot;eclipsehelp&quot; transformation<br />
+
<p>
-
type. See the Dita User Guide for instructions on how to run a Dita<br />
+
The Platform Runtime Binary package is distributed as an archive file, and
-
transformation.&lt;/p&gt;<br />
+
can be unarchived at any suitable location.
-
<br />
+
</p>
-
&lt;p&gt;After rendering, the output directory will contain an Eclipse Help plugin.<br />
+
<h2>Setting Up Your First Dita Document</h2>
-
Simply copy the entire output directory to:&lt;/p&gt;<br />
+
<p>
-
<br />
+
Render a Dita map and topic content using the &quot;eclipsehelp&quot; transformation
-
&lt;p&gt;&amp;lt;where you installed the Eclipse Platform Runtime Binary<br />
+
type. See the Dita User Guide for instructions on how to run a Dita
-
package&amp;gt;/eclipse/plugins&lt;/p&gt;<br />
+
transformation.
-
<br />
+
</p>
-
&lt;p&gt;so that the copied output directory is beneath the plugins directory. For<br />
+
<p>
-
example, if you were to render the Dita Users' Guide, you could copy the<br />
+
After rendering, the output directory will contain an Eclipse Help plugin.
-
output directory to:&lt;/p&gt;<br />
+
Simply copy the entire output directory to:
-
<br />
+
</p>
-
&lt;p&gt;&amp;lt;where you installed the Eclipse Platform Runtime Binary<br />
+
<p>
-
package&amp;gt;/eclipse/plugins/dita-uguide&lt;/p&gt;<br />
+
&lt;where you installed the Eclipse Platform Runtime Binary
-
<br />
+
package&gt;/eclipse/plugins
-
&lt;h2&gt;Starting the Eclipse Infocenter&lt;/h2&gt;<br />
+
</p>
-
<br />
+
<p>
-
&lt;p&gt;The Infocenter requires Sun Java 1.5. Start the Infocenter with the<br />
+
so that the copied output directory is beneath the plugins directory. For
-
following command:&lt;/p&gt;<br />
+
example, if you were to render the Dita Users' Guide, you could copy the
-
<br />
+
output directory to:
-
&lt;p&gt;&lt;code&gt;java -classpath<br />
+
</p>
-
&amp;lt;eclipse-location&amp;gt;/eclipse/plugins/org.eclipse.help.base_3.3.1.v20070813_33x.jar<br />
+
<p>
-
org.eclipse.help.standalone.Infocenter -command start -eclipsehome<br />
+
&lt;where you installed the Eclipse Platform Runtime Binary
-
&amp;lt;eclipse-location&amp;gt;/eclipse -port 8081&lt;/code&gt;&lt;/p&gt;<br />
+
package&gt;/eclipse/plugins/dita-uguide
-
<br />
+
</p>
-
&lt;p&gt;where &amp;lt;eclipse-location&amp;gt; is the point where you installed the<br />
+
<h2>Starting the Eclipse Infocenter</h2>
-
Eclipse Platform Runtime Binary package.&lt;/p&gt;<br />
+
<p>
-
<br />
+
The Infocenter requires Sun Java 1.5. Start the Infocenter with the
-
&lt;p&gt;NB: This command is run on a single line.&lt;/p&gt;<br />
+
following command:
-
<br />
+
</p>
-
&lt;p&gt;Point your favorite browser to http://localhost:8081/help/index.jsp&lt;/p&gt;<br />
+
<p>
-
<br />
+
java -classpath
-
&lt;p&gt;The Infocenter will appear, with bookmarks to the left, and an Eclipse<br />
+
&lt;eclipse-location&gt;/eclipse/plugins/org.eclipse.help.base_3.3.1.v20070813_33x.jar
-
welcome page in the right frame.&lt;/p&gt;<br />
+
org.eclipse.help.standalone.Infocenter -command start -eclipsehome
-
<br />
+
&lt;eclipse-location&gt;/eclipse -port 8081
-
&lt;p&gt;The first few bookmarks will be Eclipse platform documentation. At the<br />
+
</p>
-
bottom of the bookmark list, you should see your Dita document.&lt;/p&gt;<br />
+
<p>
-
<br />
+
where &lt;eclipse-location&gt; is the point where you installed the
-
&lt;p&gt;To shut down the Infocenter, re-run the above command, but with the<br />
+
Eclipse Platform Runtime Binary package.
-
augument &quot;-command shutdown&quot;&lt;/p&gt;<br />
+
</p>
-
<br />
+
<p>
-
&lt;h2&gt;Customization and Branding&lt;/h2&gt;<br />
+
NB: This command is run on a single line.
-
<br />
+
</p>
-
&lt;p&gt;When you opened the Infocenter, you probably noticed how the help system<br />
+
<p>
-
was branded as an Eclipse product. To change the branding to suit your Dita<br />
+
Point your favorite browser to http://localhost:8081/help/index.jsp
-
documentation requires editing a set of configuration files.&lt;/p&gt;<br />
+
</p>
-
<br />
+
<p>
-
&lt;h3&gt;Product Branding&lt;/h3&gt;<br />
+
The Infocenter will appear, with bookmarks to the left, and an Eclipse
-
<br />
+
welcome page in the right frame.
-
&lt;p&gt;With your favorite text editor, open:&lt;/p&gt;<br />
+
</p>
-
<br />
+
<p>
-
&lt;p&gt;&amp;lt;eclipse-location&amp;gt;/eclipse/plugins/org.eclipse.platform_3.3.3.r33x_r20080129/plugin.properties&lt;/p&gt;<br />
+
The first few bookmarks will be Eclipse platform documentation. At the
-
<br />
+
bottom of the bookmark list, you should see your Dita document.
-
&lt;p&gt;Near the top of the file, you will see:&lt;/p&gt;<br />
+
</p>
-
<br />
+
<p>
-
&lt;p&gt;&lt;code&gt;productName=Eclipse Platform&lt;/code&gt;&lt;/p&gt;<br />
+
To shut down the Infocenter, re-run the above command, but with the
-
<br />
+
augument &quot;-command shutdown&quot;
-
&lt;p&gt;Change this to suit your Dita documentation.&lt;/p&gt;<br />
+
</p>
-
<br />
+
<h2>Customization and Branding</h2>
-
&lt;p&gt;To activate this variable, it may be necessary to erase the Eclipse<br />
+
<p>
-
runtime cache. As of this writing, the only way I know how to do this is to<br />
+
When you opened the Infocenter, you probably noticed how the help system
-
delete the cache by hand. After shutting down the Infocenter, go to:&lt;/p&gt;<br />
+
was branded as an Eclipse product. To change the branding to suit your Dita
-
<br />
+
documentation requires editing a set of configuration files.
-
&lt;p&gt;&amp;lt;eclipse-location&amp;gt;/eclipse/configuration&lt;/p&gt;<br />
+
</p>
-
<br />
+
<h3>Product Branding</h3>
-
&lt;p&gt;Delete all directories that start with &quot;org.&quot;, being careful<br />
+
<p>
-
&lt;strong&gt;NOT&lt;/strong&gt; to delete the file &quot;config.ini&quot;&lt;/p&gt;<br />
+
With your favorite text editor, open:
-
<br />
+
</p>
-
&lt;h3&gt;Bookmarks&lt;/h3&gt;<br />
+
<p>
-
<br />
+
&lt;eclipse-location&gt;/eclipse/plugins/org.eclipse.platform_3.3.3.r33x_r20080129/plugin.properties
-
&lt;p&gt;To hide the Eclipse documentation listed in the bookmarks, edit the<br />
+
</p>
-
file:&lt;/p&gt;<br />
+
<p>
-
<br />
+
Near the top of the file, you will see:
-
&lt;p&gt;&amp;lt;eclipse-location&amp;gt;/eclipse/plugins/org.eclipse.platform_3.3.3.r33x_r20080129/helpData.xml&lt;/p&gt;<br />
+
</p>
-
<br />
+
<p>
-
&lt;p&gt;Change the tocOrder tag to &quot;hidden&quot; to hide the Eclipse bookmarks. The<br />
+
productName=Eclipse Platform
-
file should look like:&lt;/p&gt;<br />
+
</p>
-
&lt;pre&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;<br />
+
<p>
-
&amp;lt;extensions&amp;gt;<br />
+
Change this to suit your Dita documentation.
-
&amp;lt;hidden&amp;gt;<br />
+
</p>
-
&amp;lt;toc id=&quot;/org.eclipse.platform.doc.user/toc.xml&quot;/&amp;gt;<br />
+
<p>
-
&amp;lt;toc id=&quot;/org.eclipse.jdt.doc.user/toc.xml&quot;/&amp;gt;<br />
+
To activate this variable, it may be necessary to erase the Eclipse
-
&amp;lt;toc id=&quot;/org.eclipse.platform.doc.isv/toc.xml&quot;/&amp;gt;<br />
+
runtime cache. As of this writing, the only way I know how to do this is to
-
&amp;lt;toc id=&quot;/org.eclipse.jdt.doc.isv/toc.xml&quot;/&amp;gt;<br />
+
delete the cache by hand. After shutting down the Infocenter, go to:
-
&amp;lt;toc id=&quot;/org.eclipse.pde.doc.user/toc.xml&quot;/&amp;gt;<br />
+
</p>
-
&amp;lt;/hidden&amp;gt;<br />
+
<p>
-
&amp;lt;/extensions&amp;gt;&lt;/pre&gt;<br />
+
&lt;eclipse-location&gt;/eclipse/configuration
-
<br />
+
</p>
-
&lt;p&gt;If you have several Dita documents served by the Infocenter, they will<br />
+
<p>
-
appear in the bookmark list in a default order. If you would like to modify<br />
+
Delete all directories that start with &quot;org.&quot;, being careful
-
the order, you can use the helpData.xml file to do so. This is done with the<br />
+
<strong>NOT</strong> to delete the file &quot;config.ini&quot;
-
tocOrder element. For example:&lt;/p&gt;<br />
+
</p>
-
&lt;pre&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;<br />
+
<h3>Bookmarks</h3>
-
&amp;lt;extensions&amp;gt;<br />
+
<p>
-
&amp;lt;tocOrder&amp;gt;<br />
+
To hide the Eclipse documentation listed in the bookmarks, edit the
-
&amp;lt;toc id=&quot;/dita-userguide/DITA-userguide.xml&quot;/&amp;gt;<br />
+
file:
-
&amp;lt;toc id=&quot;/another-doc/DOC-document.xml&quot;/&amp;gt;<br />
+
</p>
-
&amp;lt;/tocOrder&amp;gt;<br />
+
<p>
-
&amp;lt;hidden&amp;gt;<br />
+
&lt;eclipse-location&gt;/eclipse/plugins/org.eclipse.platform_3.3.3.r33x_r20080129/helpData.xml
-
&amp;lt;toc id=&quot;/org.eclipse.platform.doc.user/toc.xml&quot;/&amp;gt;<br />
+
</p>
-
&amp;lt;toc id=&quot;/org.eclipse.jdt.doc.user/toc.xml&quot;/&amp;gt;<br />
+
<p>
-
&amp;lt;toc id=&quot;/org.eclipse.platform.doc.isv/toc.xml&quot;/&amp;gt;<br />
+
Change the tocOrder tag to &quot;hidden&quot; to hide the Eclipse bookmarks. The
-
&amp;lt;toc id=&quot;/org.eclipse.jdt.doc.isv/toc.xml&quot;/&amp;gt;<br />
+
file should look like:
-
&amp;lt;toc id=&quot;/org.eclipse.pde.doc.user/toc.xml&quot;/&amp;gt;<br />
+
</p>
-
&amp;lt;/hidden&amp;gt;<br />
+
<p>
-
&amp;lt;/extensions&amp;gt;&lt;/pre&gt;<br />
+
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
-
<br />
+
</p>
-
&lt;p&gt;The content of the id attribute in the above example is not a<br />
+
<p>
-
filename reference. Instead, it is based on information contained in<br />
+
&lt;extensions&gt;
-
the Dita document plugin configuration file. This file is named<br />
+
</p>
-
&quot;plugin.xml,&quot; and is located in the Dita eclipsehelp output<br />
+
<p>
-
directory. For example, in the Dita User Guide output located at:&lt;/p&gt;<br />
+
&lt;hidden&gt;
-
<br />
+
</p>
-
&lt;p&gt;&amp;lt;eclipse-location&amp;gt;/eclipse/plugins/dita-ugide/plugin.xml&lt;/p&gt;<br />
+
<p>
-
<br />
+
&lt;toc id=&quot;/org.eclipse.platform.doc.user/toc.xml&quot;/&gt;
-
&lt;p&gt;the content is:&lt;/p&gt;<br />
+
</p>
-
&lt;pre&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;<br />
+
<p>
-
&amp;lt;plugin name=&quot;DITA User Guide&quot; id=&quot;dita-userguide&quot; version=&quot;1.0&quot; provider-name=&quot;DITA&quot;&amp;gt;<br />
+
&lt;toc id=&quot;/org.eclipse.jdt.doc.user/toc.xml&quot;/&gt;
-
  &amp;lt;extension point=&quot;org.eclipse.help.toc&quot;&amp;gt;<br />
+
</p>
-
    &amp;lt;toc file=&quot;DITA-userguide.xml&quot; primary=&quot;true&quot;/&amp;gt;<br />
+
<p>
-
  &amp;lt;/extension&amp;gt;<br />
+
&lt;toc id=&quot;/org.eclipse.platform.doc.isv/toc.xml&quot;/&gt;
-
  &amp;lt;extension point=&quot;org.eclipse.help.index&quot;&amp;gt;<br />
+
</p>
-
    &amp;lt;index file=&quot;index.xml&quot;/&amp;gt;<br />
+
<p>
-
  &amp;lt;/extension&amp;gt;<br />
+
&lt;toc id=&quot;/org.eclipse.jdt.doc.isv/toc.xml&quot;/&gt;
-
&amp;lt;/plugin&amp;gt;<br />
+
</p>
-
&lt;/pre&gt;<br />
+
<p>
-
<br />
+
&lt;toc id=&quot;/org.eclipse.pde.doc.user/toc.xml&quot;/&gt;
-
&lt;p&gt;The first part of the extensions/tocOrder/toc/@id attribute in<br />
+
</p>
-
helpData.xml is taken from the the id attribute in the plugin.xml file. The<br />
+
<p>
-
second part of the extensions/tocOrder/toc/@id attribute, after the second /,<br />
+
&lt;/hidden&gt;
-
is a filename reference. It is taken from the plugin.xml file at<br />
+
</p>
-
plugin/extension/toc/@file attribute.&lt;/p&gt;<br />
+
<p>
-
<br />
+
&lt;/extensions&gt;
-
&lt;p&gt;In other words, the first part, between the first / and the second / is<br />
+
</p>
-
from the id attribute in plugin.xml. The second part is from the file<br />
+
<p>
-
attribute in the toc element in plugin.xml&lt;/p&gt;<br />
+
If you have several Dita documents served by the Infocenter, they will
-
<br />
+
appear in the bookmark list in a default order. If you would like to modify
-
&lt;p&gt;NB: In helpData.xml, the tocOrder element &lt;strong&gt;MUST&lt;/strong&gt; precede<br />
+
the order, you can use the helpData.xml file to do so. This is done with the
-
the hidden element.&lt;/p&gt;<br />
+
tocOrder element. For example:
-
<br />
+
</p>
-
&lt;h3&gt;Product Banner&lt;/h3&gt;<br />
+
<p>
-
<br />
+
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
-
&lt;p&gt;This feature is optional, a matter of taste or policy. The banner, if<br />
+
</p>
-
activated, appears at the top of every help page, and reduces the display<br />
+
<p>
-
area of the page. It can be used to display such things as logos and customer<br />
+
&lt;extensions&gt;
-
service information. It's a standard html page.&lt;/p&gt;<br />
+
</p>
-
<br />
+
<p>
-
&lt;p&gt;Banner configuration is done in a configuration file located in the<br />
+
&lt;tocOrder&gt;
-
platform plugin directory:&lt;/p&gt;<br />
+
</p>
-
<br />
+
<p>
-
&lt;p&gt;&amp;lt;eclipse-location&amp;gt;/eclipse/plugins/org.eclipse.platform_3.3.3.r33x_r20080129/plugin_customization.ini&lt;/p&gt;<br />
+
&lt;toc id=&quot;/dita-userguide/DITA-userguide.xml&quot;/&gt;
-
<br />
+
</p>
-
&lt;p&gt;The basic configuration syntax is:&lt;/p&gt;<br />
+
<p>
-
<br />
+
&lt;toc id=&quot;/another-doc/DOC-document.xml&quot;/&gt;
-
&lt;p&gt;&amp;lt;plugin-name&amp;gt;/&amp;lt;parameter&amp;gt; = &amp;lt;value&amp;gt;&lt;/p&gt;<br />
+
</p>
-
<br />
+
<p>
-
&lt;p&gt;To set a banner page that is located in the dita-uguide plugin<br />
+
&lt;/tocOrder&gt;
-
directory:&lt;/p&gt;<br />
+
</p>
-
<br />
+
<p>
-
&lt;p&gt;org.eclipse.help.base/banner = /dita-userguide/doc/banner.html&lt;/p&gt;<br />
+
&lt;hidden&gt;
-
<br />
+
</p>
-
&lt;p&gt;In this case, org.eclipse.help.base is the plugin that sets this<br />
+
<p>
-
parameter, banner is the parameter that is being set, dita-userguide<br />
+
&lt;toc id=&quot;/org.eclipse.platform.doc.user/toc.xml&quot;/&gt;
-
is the plugin id where the banner page is located (NOT the plugin<br />
+
</p>
-
directory), doc is the directory within the plugin directory where the<br />
+
<p>
-
page is located, and banner.html is the banner page itself.&lt;/p&gt;<br />
+
&lt;toc id=&quot;/org.eclipse.jdt.doc.user/toc.xml&quot;/&gt;
-
<br />
+
</p>
-
&lt;p&gt;As with the TOC configuration, it's important to remember to<br />
+
<p>
-
distinguish between the plugin id and the name of the plugin<br />
+
&lt;toc id=&quot;/org.eclipse.platform.doc.isv/toc.xml&quot;/&gt;
-
directory.&lt;/p&gt;<br />
+
</p>
-
<br />
+
<p>
-
&lt;p&gt;To set the pixel height of the window where the banner will be<br />
+
&lt;toc id=&quot;/org.eclipse.jdt.doc.isv/toc.xml&quot;/&gt;
-
displayed, add this parameter to plugin_customization.ini:&lt;/p&gt;<br />
+
</p>
-
<br />
+
<p>
-
&lt;p&gt;org.eclipse.help.base/banner_height = 80&lt;/p&gt;<br />
+
&lt;toc id=&quot;/org.eclipse.pde.doc.user/toc.xml&quot;/&gt;
-
<br />
+
</p>
-
&lt;p&gt;To activate this configuration, shutdown and re-start the<br />
+
<p>
-
Infocenter.&lt;/p&gt;<br />
+
&lt;/hidden&gt;
-
<br />
+
</p>
-
&lt;h3&gt;Home Page&lt;/h3&gt;<br />
+
<p>
-
<br />
+
&lt;/extensions&gt;
-
&lt;p&gt;The home page is displayed when the user clicks on the home icon at<br />
+
</p>
-
the top of the help display. It can be used to explain basic usage of<br />
+
<p>
-
the help system.&lt;/p&gt;<br />
+
The content of the id attribute in the above example is not a
-
<br />
+
filename reference. Instead, it is based on information contained in
-
&lt;p&gt;To set a home page that is located in the dita-uguide plugin<br />
+
the Dita document plugin configuration file. This file is named
-
directory, add this parameter to plugin_customization.ini:&lt;/p&gt;<br />
+
&quot;plugin.xml,&quot; and is located in the Dita eclipsehelp output
-
<br />
+
directory. For example, in the Dita User Guide output located at:
-
&lt;p&gt;org.eclipse.help.base/help_home = /dita-userguide/doc/help_home.html&lt;/p&gt;<br />
+
</p>
-
<br />
+
<p>
-
&lt;p&gt;The syntax is the same as for the banner page parameter.&lt;/p&gt;<br />
+
&lt;eclipse-location&gt;/eclipse/plugins/dita-ugide/plugin.xml
-
<br />
+
</p>
-
&lt;p&gt;To activate this configuration, shutdown and re-start the<br />
+
<p>
-
Infocenter.&lt;/p&gt;
+
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;
  +
&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;/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/org.eclipse.platform_3.3.3.r33x_r20080129/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 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>
 
 
Revision of Sun, 2008-03-16 16:28:

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 3.3.2 Download Page

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 Branding

With your favorite text editor, open:

<eclipse-location>/eclipse/plugins/org.eclipse.platform_3.3.3.r33x_r20080129/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"

Bookmarks

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

<eclipse-location>/eclipse/plugins/org.eclipse.platform_3.3.3.r33x_r20080129/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>

</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/org.eclipse.platform_3.3.3.r33x_r20080129/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 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