Discussion:
Problems customizing WebHelp and HTML output
Janice Manwiller
2014-09-22 11:38:46 UTC
Permalink
Still relatively new to DocBook.

In the doc set that I inherited, there are XSL files marked for FO (PDF),
HTML, and WebHelp. Our doc build uses the Maven docbkx plugin to generate
our documents.

I've been able use information from the DocBook XSL reference to make
changes to the FO file and see the results in the PDF output. These changes
include:

- Removing table and figure numbers
- Removing the lists of tables and figures
- Updating the cross-reference text to remove "the section called"

However, any changes I make in the HTML or WebHelp XSL files seem to be
ignored. I've been able to update the CSS file to make changes to the look
and feel of the output, but not any changes to the basic transformation.

For example, I added this chunk to the FO stylesheet to handle removing the
table and figure numbers and updating the cross-reference text:

<!-- Eliminates the table and figure numbers. Also gets rid of "the section
called" in cross-references -->
<xsl:param name="local.l10n.xml" select="document('')"/>
<l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0">
<l:l10n language="en">
<l:context name="xref">
<l:template name="appendix" text="%t"/>
<l:template name="chapter" text="%t"/>
<l:template name="section" text="%t"/>
</l:context>
<l:context name="title">
<l:template name="table" text="%t"/>
</l:context>
<l:context name="xref-number-and-title">
<l:template name="table" text="&#8220;%t&#8221;"/>
</l:context>
<l:context name="title">
<l:template name="figure" text="%t"/>
</l:context>
<l:context name="xref-number-and-title">
<l:template name="figure" text="&#8220;%t&#8221;"/>
</l:context>
</l:l10n>
</l:i18n>

<xsl:template match="table" mode="label.markup"/>
<xsl:template match="figure" mode="label.markup"/>
<xsl:template match="appendix" mode="label.markup"/>
<xsl:template match="chapter" mode="label.markup"/>
<xsl:template match="section" mode="label.markup"/>


However, adding the same chunk to the WebHelp XSL file has no effect on the
WebHelp output.

As another example, our HTML output still has section numbers. I added the
following to the HTML stylesheet:

<xsl:param name="section.autolabel" select="0"/>


But that had no effect either - the section numbers were still there.

Am I missing something? Is there a difference in the transformation
configuration for online output vs. PDF output?

Thanks,

Janice
Kasun Gajasinghe
2014-09-22 13:04:11 UTC
Permalink
Hi Janice,

How do you feed these customizations to the docbkx plugin? May be there is
additional configurations you need to do in the docbkx maven plugin?
Post by Janice Manwiller
Still relatively new to DocBook.
In the doc set that I inherited, there are XSL files marked for FO (PDF),
HTML, and WebHelp. Our doc build uses the Maven docbkx plugin to generate
our documents.
I've been able use information from the DocBook XSL reference to make
changes to the FO file and see the results in the PDF output. These changes
- Removing table and figure numbers
- Removing the lists of tables and figures
- Updating the cross-reference text to remove "the section called"
However, any changes I make in the HTML or WebHelp XSL files seem to be
ignored. I've been able to update the CSS file to make changes to the look
and feel of the output, but not any changes to the basic transformation.
For example, I added this chunk to the FO stylesheet to handle removing
<!-- Eliminates the table and figure numbers. Also gets rid of "the
section called" in cross-references -->
<xsl:param name="local.l10n.xml" select="document('')"/>
<l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0">
<l:l10n language="en">
<l:context name="xref">
<l:template name="appendix" text="%t"/>
<l:template name="chapter" text="%t"/>
<l:template name="section" text="%t"/>
</l:context>
<l:context name="title">
<l:template name="table" text="%t"/>
</l:context>
<l:context name="xref-number-and-title">
<l:template name="table" text="&#8220;%t&#8221;"/>
</l:context>
<l:context name="title">
<l:template name="figure" text="%t"/>
</l:context>
<l:context name="xref-number-and-title">
<l:template name="figure" text="&#8220;%t&#8221;"/>
</l:context>
</l:l10n>
</l:i18n>
<xsl:template match="table" mode="label.markup"/>
<xsl:template match="figure" mode="label.markup"/>
<xsl:template match="appendix" mode="label.markup"/>
<xsl:template match="chapter" mode="label.markup"/>
<xsl:template match="section" mode="label.markup"/>
However, adding the same chunk to the WebHelp XSL file has no effect on
the WebHelp output.
As another example, our HTML output still has section numbers. I added the
<xsl:param name="section.autolabel" select="0"/>
But that had no effect either - the section numbers were still there.
Am I missing something? Is there a difference in the transformation
configuration for online output vs. PDF output?
Thanks,
Janice
--
~~~*******'''''''''''''*******~~~
*Kasun Gajasinghe*
Software Engineer; WSO2 Inc.; http://wso2.com,
*linked-in: *http://lk.linkedin.com/in/gajasinghe
*blog: **http://blog.kasunbg.org* <http://blog.kasunbg.org/>


*twitter: **http://twitter.com/kasunbg* <http://twitter.com/kasunbg>
Loading...