Webhelp output - altering the output of productTitle

Here should go questions about transforming XML with XSLT and FOP.
Rodrik
Posts: 30
Joined: Mon Jan 27, 2014 11:19 am

Webhelp output - altering the output of productTitle

Post by Rodrik »

Is there any way to get the webhelp output to wrap the contents of the <booklibrary>, <mainbooktitle>, <booktitlealt> elements in separate spans/divs so that they can be more easily formatted?

Currently all three are concatenated into one <h1>:

Code: Select all

<div id="productTitle"><h1>
Book Library
Main Book Title
Book Title Alt</h1><div class="framesLink"><a href="index_frames.html" id="oldFrames"><img src="oxygen-webhelp/resources/img/frames.png" alt="With Frames" border="0" /></a></div></div>
Regards

Rodrik
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: Webhelp output - altering the output of productTitle

Post by sorin_ristache »

Hi Rodrik,

We'll take it as an enhancement request for the next version of Oxygen. Each element of the bookmap file inside booktitle will be turned into an XHTML span element with a class attribute borrowed from the DITA class value. For example if the bookmap file has the title:

Code: Select all

  <booktitle>
<booklibrary>Book Library</booklibrary>
<mainbooktitle>Main Book Title</mainbooktitle>
<booktitlealt>Book Title Alt</booktitlealt>
</booktitle>
then the title in the Webhelp page will be:

Code: Select all

  <h1>
<span class="booktitle">
<span class="booklibrary">Book Library</span>
<span class="mainbooktitle">Main Book Title</span>
<span class="booktitlealt">Book Title Alt</span>
</span>
</h1>
You can easily format this title, for example hide the booklibrary and the booktitlealt as below, with a custom CSS that you set in the args.css parameter of the Webhelp transformation:

Code: Select all

.booklibrary, .booktitlealt {
display:none;
}
Please contact us by email at support(at)oxygenxml(dot)com to give you the modifications that you need to apply (two modified XSLT files that will overwrite two stock Oxygen XSLT files) to get the title that you want in the Webhelp pages, if you don't want to wait until the official release of the next Oxygen version.


Regards,
Sorin
Rodrik
Posts: 30
Joined: Mon Jan 27, 2014 11:19 am

Re: Webhelp output - altering the output of productTitle

Post by Rodrik »

That's great -- thank you very much. You guys are incredibly responsive.

I'll be emailing you.

Regards

Rodrik
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: Webhelp output - altering the output of productTitle

Post by sorin_ristache »

Hi Rodrik,

I just replied to your email with the modified files that will allow hiding or styling each bookmap title component. These modifications will go in the next version of Oxygen anyway.

Please let us know if it does not work for you.


Regards,
Sorin
Post Reply