Page 1 of 1

DocBook WebHelp reference numbering

Posted: Fri Jan 25, 2013 6:38 am
by P4jjb
Hi Radu & Sorin,

Where does the DocBook 5 WebHelp derive numbering for reference chapters? I need to override the default of I and set this to 0.
In the DocBook 5 PDF transform there's a reference.autolabel param, so that was easy. :D

If I dig down in the various WebHelp files, these seem likely:

C:\Program Files\Oxygen XML Editor 14\frameworks\docbook\xsl\webhelp\xsl\webhelp-common.xsl
Line 51: <xsl:param name="reference.autolabel" select="0"/>

and

C:\Program Files\Oxygen XML Editor 14\frameworks\docbook\xsl\xhtml\refentry.xsl
Line 47: <xsl:number from="d:book" count="d:reference" format="I."/>

But, when I edited the above so <xsl:number... format="0"/>, the reference still displayed numbered as "I." Obviously I'm editing the incorrect file.

Thanks!

Re: DocBook WebHelp reference numbering

Posted: Fri Jan 25, 2013 3:45 pm
by sorin_ristache
Hi,

Do you mean you want to suppress the numbers generated automatically that precede the chapter title? You have to set the parameter chapter.autolabel to 0. There are similar parameters for sections (section.autolabel), the Preface part (preface.autolabel), references (reference.autolabel). In the WebHelp transformation when you add a new parameter to the list of built-in ones in the Parameters dialog box you have to add it also in the Ant script file that executes the transformation, that is [Oxygen-install-dir]/frameworks/docbook/xsl/com.oxygenxml.webhelp/build_docbook.xml. You have to add it in the task called docbook-xhtml-transform which in Oxygen 14.1 is between lines 40 and 107. For example you can add chapter.autolabel at line 87:

Code: Select all

 . . .
<param name="WEBHELP_PRODUCT_ID" expression="${webhelp.product.id}" if="webhelp.product.id"/>
<param name="chapter.autolabel" expression="${chapter.autolabel}" if="chapter.autolabel"/>
</xslt>
</target>
. . .
Starting with Oxygen 14.2 this parameter together with a long list of other DocBook specific parameters (which are available for example in the DocBook PDF transformation) will be available by default in the DocBook WebHelp transformation, so you won't have to add it manually.


Regards,
Sorin

Re: DocBook WebHelp reference numbering

Posted: Wed Jan 30, 2013 5:51 am
by P4jjb
Thanks, Sorin.

From other posts I see that 14.2 will be released sometime this spring. I need to customize the DocBook 5 WebHelp within the next few weeks, so I'll look at those files and re-post any further questions.

Regards,
-jjb

Re: DocBook WebHelp reference numbering

Posted: Wed Jan 30, 2013 10:09 am
by sorin_ristache
Hi,

Version 14.2 will be released in February. Please let us know if you have problems with your Docbook customization.


Regards,
Sorin