On 11/27/2015 07:06 AM, Martin Goik wrote:
This one is a little bit complicated.

Using current Xmlmind editor to convert Docbook 5 instances to Eclipse
help IMHO suffers from two problems:

1. The generated plugin.xml description file contains a (false) DOCTYPE
declaration:

<!DOCTYPE plugin
   PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd";>
<plugin>
    <extension point="org.eclipse.help.toc"> ...
I believe this is a failure of the original Docbook stylesheets which
force each chunk to receive a DOCTYPE even if it does not even fit the
document in question.

Yes, that's right. This also happened for EPUB (but we currently don't use the stock stylesheets when generating EPUB. We wrote our own stylesheets.).

We will probably not workaround this problem ourselves. Please report this bug to the DocBook XSL Stylesheets development team. If you do that, there are chances it'll get fixed in soon to be released 1.79.1.




2. Current Eclipse standalone Infocenter (starting from Eclipse 3, see
http://help.eclipse.org/mars/topic/org.eclipse.platform.doc.isv/guide/ua_help_setup_standalone.htm)
in addition require a META-INF/MANIFEST.MF file like i.e.:

Manifest-Version: 1.0
Bundle-Version: 1.0
Bundle-Name: Figures
Bundle-SymbolicName: de.hdm_stuttgart.mi.fig
Bundle-Vendor: Martin Goik, g...@hdm-stuttgart.de

For a standalone Infocenter instance (and probably other scenarios as
well) problem 1. leads to a process that silently never comes into
service. With debugging enabled a "tail -f ../xyz.log" will show
"isApplicationRunning? false" lines dropping in forever.

Problem 2. leads to the plugin doc not to show up at all.

My current fix is solving 1. by post processing  perl -i -p -e
'$$/=undef;s/\n[ \t]*<!DOCTYPE[^>]+\n[^>]*>$$//m' plugin.xml (Ugly!) and
2. by manually creating the required META-INF/MANIFEST.MF (not quite so
ugly).

On the other hand at least problem 2. is being addressed by the Docbook5
XSL stylesheets: A file .../docbook5/xsl/eclipse/eclipse3.xsl is on
offer generating an Eclipse-3 compatible META-INF/MANIFEST.MF plugin doc
description (It however does not solve problem 1.).

Unfortunately the configuration of <command name="db5.toEclipseHelp"> in
.../addon/config/docbook5/docbook5_convert_menu.incl does not copy the
MANIFEST.MF unless I add a line:
<copyFiles files="META-INF/MANIFEST.MF" toDir="META-INF" />


We'll switch to eclipse3.xsl and update the corresponding process command in the next release of XXE.

(While at it, we'll also review the Eclipse Help files our XMLmind DITA Converter generates out of DITA documents. Unlike the DocBook XSL Stylesheets, XMLmind DITA Converter is entirely our work.)





Moreover I have no clue how to configure using xsl/eclipse/eclipse3.xsl
in Xmlmind from a user's GUI perspective: A style sheet customization
will invariably (and by GUI unchangeably) extend xsl/eclipse/eclipse.xsl
(rather than eclipse3.xsl) being defined in  <command
name="db5.toEclipseHelp">. So far my only options are either replacing
"eclipse.xsl" by "eclipse3.xsl" in docbook5_convert_menu.incl or using a
text editor manually changing the Xmlmind generated customization entry
to <xsl:import href="xxe-config:docbook5/xsl/eclipse/eclipse3.xsl"/>.

The only clean solution is to completely redefine process command <command name="db5.toEclipseHelp"> in your hand-written DocBook 5 configuration customization.

Your custom db5.toEclipseHelp
1) invokes eclipse3.xsl
2) adds <copyFiles files="META-INF/MANIFEST.MF" toDir="META-INF" />

See "Customizing an existing configuration" http://www.xmlmind.com/xmleditor/_distrib/doc/configure/customizing.html





BTW: Eclipse 3.3 started in 2007. Plugin compatibility support for the
described MANIFEST.MF problem has been dropped starting with "Luna".

Note taken.

Here, at XMLmind, we don't use Eclipse and we don't generate Eclipse Help for our own use. That's why, unlike what happens for most the other output formats, we don't check that everything is right. We trust the DocBook XSL Stylesheets development team for that.




BTW: There is a brand new 1.79.0 version of docbook-xsl from 2015-10-15


We know that. However 1.79.0, which ends with .0, is just a release candidate. Generally, we wait for the M.m.1 (e.g. 1.79.1) version.



--
XMLmind XML Editor Support List
xmleditor-support@xmlmind.com
http://www.xmlmind.com/mailman/listinfo/xmleditor-support

Reply via email to