Hello,
Hi, due to the very poor search functionality in Webhelp, we have started
testing the Eclipse Help platform instead. Eclipse Help/Infocenter comes with
Lucene indexing and gives much better search results than the word-cloud
webhelp search.
Indeed.
The Eclipse help output is however a bit more “old-fashioned” and difficult to
adapt. For example, we would like to have the chapter and section numbers
output in the toc.xml. Something we accomplish in Webhelp using XSL
section.label.includes.component.label=1, but this does not seem to apply to
toc.xml in the Eclipse output. Any way to fix this?
Based on parameter section.label.includes.component.label
(https://docbook.sourceforge.net/release/xsl/current/doc/html/section.label.includes.component.label.html),
you seem to be converting a DocBook document to Web Help and Eclipse Help.
We, XMLmind Software, are the authors of the xsl/webhelp/webhelp.xsl
stylesheet included in our XMLmind XML Editor distributions. We did that
in order to be able to use our in house tool "XMLmind Web Help
Compiler", https://www.xmlmind.com/ditac/whc.shtml. This XSL stylesheet
happens to support section.label.includes.component.label=1 when
generating Web Help's toc.xml because of the way we wrote it. See below.
---
<xsl:template match="section" mode="whtoc">
<xsl:variable name="title">
<xsl:apply-templates select="." mode="object.title.markup.textonly"/>
</xsl:variable>
<whc:entry>
<xsl:attribute name="href">
<xsl:call-template name="href.target.uri"/>
</xsl:attribute>
<whc:title><xsl:value-of select="normalize-space($title)"/></whc:title>
<xsl:apply-templates select="section" mode="whtoc"/>
</whc:entry>
</xsl:template>
---
OTOH, we, XMLmind Software, are NOT the authors of the
xsl/eclipse/eclipse.xsl. Therefore we have no idea about how to make it
support section.label.includes.component.label=1 when generating Eclipse
Help's toc.xml. See code below.
---
<xsl:template
match="book|part|reference|preface|chapter|bibliography|appendix|article|glossary|section|sect1|sect2|sect3|sect4|sect5|refentry|colophon|bibliodiv|index"
mode="etoc">
<xsl:variable name="title">
<xsl:if test="$eclipse.autolabel=1">
<xsl:variable name="label.markup">
<xsl:apply-templates select="." mode="label.markup"/>
</xsl:variable>
<xsl:if test="normalize-space($label.markup)">
<xsl:value-of
select="concat($label.markup,$autotoc.label.separator)"/>
</xsl:if>
</xsl:if>
<xsl:apply-templates select="." mode="title.markup"/>
</xsl:variable>
<xsl:variable name="href">
<xsl:call-template name="href.target.with.base.dir">
<xsl:with-param name="context" select="/"/> <!-- Generate
links relative to the location of root file/toc.xml file -->
</xsl:call-template>
</xsl:variable>
<topic label="{normalize-space($title)}" href="{$href}">
<xsl:apply-templates
select="part|reference|preface|chapter|bibliography|appendix|article|glossary|section|sect1|sect2|sect3|sect4|sect5|refentry|colophon|bibliodiv|index"
mode="etoc"/>
</topic>
</xsl:template>
---
Eclipse Help's toc.xml looks like this:
---
<toc label="XMLmind XML Editor - Support of XPath 1.0" topic="index.html">
<topic label="Native XPath 1.0 support" href="pt01.html">
<topic label="XPath functions" href="ch01.html">
<topic label="Extension functions" href="ch01s01.html"/>
<topic label="Java™ methods as extension functions" href="ch01s02.html"/>
</topic>
</topic>
<topic label="The XED scripting language" href="pt02.html">
<topic label="Language syntax" href="ch02.html">
<topic label="Syntax" href="ch02s01.html"/>
<topic label="Text file encoding" href="ch02s02.html"/>
...
---
We suggest to post a support request to
[email protected] ("The docbook-apps list is for
questions about applications (stylesheets, transformation tools,
publishing tools, processing requirements, etc.) that use or work with
DocBook.")
Best regards,
--
XMLmind XML Editor Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/xmleditor-support