webhelp.copyright parameter for DocBook 5 WebHelp

P4jjb
Posts: 32

webhelp.copyright parameter for DocBook 5 WebHelp

Fri Feb 15, 2013 3:05 am

Hi Radu and Sorin,

Still working on oXygen 14.1 as I can't upgrade to 14.2 until next week (we're publishing doc tomorrow, Feb. 15).
I've edited the webhelp.copyright parameter but it doesn't appear in the TOC frame of the generated output. Is this a bug in 14.1?

Thanks
sorin_ristache
Posts: 4144

Re: webhelp.copyright parameter for DocBook 5 WebHelp

Fri Feb 15, 2013 11:45 am

Hi,

Sorry, yes, it is a bug in 14.1. The webhelp.copyright parameter is handled by the XSLT stylesheets but it is not passed to the stylesheets by the ANT process. Please add the following line in the <xslt> ANT task from the "create-main-files" target of the file [Oxygen-install-dir]/frameworks/docbook/xsl/com.oxygenxml.webhelp/build_docbook.xml, that is add it somewhere between lines 135 and 143 of build_docbook.xml:

Code: Select all

<param name="WEBHELP_COPYRIGHT" expression="${webhelp.copyright}" if="webhelp.copyright"/>



Regards,
Sorin
P4jjb
Posts: 32

Re: webhelp.copyright parameter for DocBook 5 WebHelp

Wed Feb 20, 2013 5:28 am

Thanks, Sorin.

I got this working, but I had to add it between lines 360-377.

Code: Select all

 <!-- Create the index.html and toc.html files. -->
    <target name="create-main-files">
        <property name="args.create.main.files.xsl" value="xsl/createMainFiles.xsl"/>
        <xslt processor="trax"
            in="${output.dir}/toc.xml"
            out="${output.dir}/dummy.html"
            style="${args.create.main.files.xsl}"
            force="yes">
            <factory name="net.sf.saxon.TransformerFactoryImpl"/>
            <param name="TOC_XML_FILEPATH" expression="${output.dir}/toc.xml"/>
            <param name="INDEX_XML_FILEPATH" expression="${output.dir}/index.xml"/>
            <param name="XHTML_FOLDER" expression="${output.dir}"/>
            <param name="OUTPUTDIR" expression="${output.dir}"/>
            <param name="BASEDIR" expression="${basedir}"/>
            <param name="DEFAULTLANG" expression="${webhelp.indexer.language}"/>
   <!-- added copyright generation -->
   <param name="WEBHELP_COPYRIGHT" expression="${webhelp.copyright}" if="webhelp.copyright"/>
        </xslt>


Also, you can only see it after you click the With Frames icon in the upper right corner of the HTML output and change the output presentation to the chunked HTML output in the right-hand frame and a slightly-different TOC presentation in the left-hand frame.
Is there a way to get the copyright to display in the left-hand frame of the original Webhelp output, without users having to click an icon to see it?

Thanks
sorin_ristache
Posts: 4144

Re: webhelp.copyright parameter for DocBook 5 WebHelp

Wed Feb 20, 2013 11:54 am

Hi,

P4jjb wrote:I got this working, but I had to add it between lines 360-377.


Yes, those are the correct line numbers for the task "create-main-files" in version 14.2. You said you still had to use version 14.1 so I specified above the line numbers for version 14.1.

P4jjb wrote:Also, you can only see it after you click the With Frames icon in the upper right corner of the HTML output and change the output presentation to the chunked HTML output in the right-hand frame and a slightly-different TOC presentation in the left-hand frame.
Is there a way to get the copyright to display in the left-hand frame of the original Webhelp output, without users having to click an icon to see it?


We will fix this problem probably in the next Oxygen version. Of course the copyright notice should show up in the Content panel in both the frameset version and the internal frames version. There is a small problem in some JavaScript code that loads the content in the left side Content panel of the internal frames version (what you called the original Webhelp output).


Regards,
Sorin
P4jjb
Posts: 32

Re: webhelp.copyright parameter for DocBook 5 WebHelp

Thu Feb 21, 2013 6:15 am

Thanks for clarifying that, Sorin. :D

I've been reading and setting some of the new DocBook 5 WebHelp parameters you included in 14.2.
For our next release's WebHelp output, we want just to replicate the look of plain 14.1 internal frames version, though add some 14.2 parameters (like glossterm.auto.link, for example). This means we don't want the additional frameset GUI elements: no chunked HTML in right window, no With Frames icon, no TOC links displaying in parent topics.

I got the TOC links disabled by setting generate.toc to 0.
How do I eliminate the frameset GUI elements?
sorin_ristache
Posts: 4144

Re: webhelp.copyright parameter for DocBook 5 WebHelp

Fri Feb 22, 2013 3:57 pm

Hi,

You need to customize the built-in transformation for the modifications in the output HTML pages that you want. For example you hide the Next/Prev links by removing or commenting out the entire <xsl:if> element at line 88 in the stylesheet [Oxygen-14.2-instal-dir]/frameworks/docbook/xsl/com.oxygenxml.webhelp/xsl/chunk_custom.xsl, or alternatively customizing this stylesheet by overriding the template with name="header.navigation" and removing the <xsl:if> element from this template.

You remove the With Frames link by removing or commenting out the following <a> element from line 347 in the stylesheet [Oxygen-14.2-install-dir]/frameworks/docbook/xsl/com.oxygenxml.webhelp/xsl/createMainFiles.xsl:

Code: Select all

<a href="index_frames.html" id="oldFrames"><img src="oxygen-webhelp/resources/img/frames.png" alt="With Frames" border="0" /></a>


The other links and icons are added in a similar way, in the XSLT stylesheets from directory [Oxygen-14.2-install-dir]/frameworks/docbook/xsl/com.oxygenxml.webhelp/xsl.


Regards,
Sorin
P4jjb
Posts: 32

Re: webhelp.copyright parameter for DocBook 5 WebHelp

Sat Feb 23, 2013 1:04 am

Thanks, Sorin.
I'll look into this customization and get back to you with any further questions.
P4jjb
Posts: 32

Re: webhelp.copyright parameter for DocBook 5 WebHelp

Tue Feb 26, 2013 3:05 am

Hi Sorin,

To follow up on this: I did try to configure the 14.1 output, and added the following code in-between lines 135-143 of the build_docbook.xml.

Code: Select all

<param name="WEBHELP_COPYRIGHT" expression="${webhelp.copyright}" if="webhelp.copyright"/>


It didn't work; the custom copyright text of webhelp.copyright still doesn't display in the TOC.
sorin_ristache
Posts: 4144

Re: webhelp.copyright parameter for DocBook 5 WebHelp

Thu Feb 28, 2013 6:58 pm

Hi Jennifer,

Sorry, the copyright text from the param webhelp.copyright is included only in the frameset version (index_frames.html), not in the internal frames version (index.html). We will include it in the interma; frames version in a maintenance build of version 14.2. Can you use the frameset version of the Webhelp output (generated in 14.1 or 14.2) until we release such a build?

If you want to set some custom styles for the copyright text like a smaller size font or a different font family or text color you can do that by adding a CSS selector that will style the div element with the footer class attribute in the CSS stylesheet [Oxygen-install-dir]\frameworks\docbook\xsl\com.oxygenxml.webhelp\oxygen-webhelp\resources\css\toc.css, for example:

Code: Select all

div.footer{
   font-size:0.7em;
   font-weight:bold;
}



Regards,
Sorin
mstrubberg
Posts: 48

Re: webhelp.copyright parameter for DocBook 5 WebHelp

Thu Mar 28, 2013 7:41 pm

Is the intended use of webhelp.copyright to add a custom copyright statement to the toc.html in the bottom of the pane?

If yes, using Oxygen 14.2 duplicate transform of the DITA Map WehHelp, webhelp.copyright=All rights reserved. does not produce the words All rights reserved in the bottom of the toc.html from index.html or index_frames.html
sorin_ristache
Posts: 4144

Re: webhelp.copyright parameter for DocBook 5 WebHelp

Fri Mar 29, 2013 12:31 pm

Hello,

The parameter webhelp.copyright is not passed correctly to the Webhelp output in version 14.2. We will fix the problem in the next maintenance build for version 14.2 and in version 15.0. If you want an Oxygen 14.2 build with this fix please download it from here.


Regards,
Sorin
Vadi
Posts: 5

Re: webhelp.copyright parameter for DocBook 5 WebHelp

Fri Sep 13, 2013 4:36 am

Is this fix available in build 2013051016 of 14.2?

I've had issues with EPUB Ant-based build, similarly to this I've had to edit docbook.xsl in frameworks\docbook\xsl\epub to set the parameter.
sorin_ristache
Posts: 4144

Re: webhelp.copyright parameter for DocBook 5 WebHelp

Fri Sep 13, 2013 10:52 am

Hi Vadi,

Yes, the webhelp.copyright parameter is passed correctly to the Webhelp transformation in build 2013051016 of Oxygen 14.2.

An alternative way of setting the copyright note is to add an element legalnotice in book/info in the Docbook XML document, but this is available only stating with version 15.0.


Regards,
Sorin
Vadi
Posts: 5

Re: webhelp.copyright parameter for DocBook 5 WebHelp

Mon Sep 16, 2013 5:31 am

Thank you.

Return to “DocBook”

Who is online

Users browsing this forum: No registered users and 1 guest