XML Blog

Wednesday, April 16, 2014

How to set a favicon in Webhelp pages

Small additions or customizations are frequently needed or desirable in the WebHelp pages generated by the DITA Map WebHelp transformation in Oxygen. This need will prompt a serial of blog posts with specific WebHelp customizations and the required source code modifications.

In the first installment let's see how we can add one of those small but significant details which lend a mark of distinction and help to increase the consistency with the overall website design theme: setting a favicon.  [ BTW the upcoming version of Oxygen will introduce a set of built-in WebHelp skins (design themes) and also a small WebHelp Skin Builder web app for visually building your own WebHelp skin/theme. Sounds like an interesting topic for a future blog post! ]

The recent versions of all the mainstream browsers (by that I mean the Web browsers with more than 3% Web usage share) will know how to interpret the following link XHTML elements:

<link rel="icon" href="/favicon.ico" type="image/x-icon"/>

<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon"/>

The href attribute obviously must point to the favicon file available on the server which hosts the Webhelp pages.

These two elements must be inserted in the file:

in the template with the attribute name="create-toc-common-file", in the head element, after title:

    <xsl:value-of select="$title"/>

<link rel="icon" href="/favicon.ico" type="image/x-icon"/>
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon"/>

That's it! Repeating the WebHelp transformation will add the favicon to the title of the browser tab.

It would be nice to have a customization mechanism for separating the built-in WebHelp files and the custom code files, but that is an enhancement for a future version of Oxygen.

Wednesday, March 05, 2014

What's your greatest wish for Oxygen XML Author 16.0?

Oxygen 16.0 is planned to be released in a couple of months and we already have quite an impressive array of new features which we plan to make available in it.
Here's some of the stuff we are working on right now:
  1. Editing properties of multiple selected table columns, rows and cells will be a snap using the Table Properties action.
    You will be able to easily select table cells either by pressing CTRL and clicking them or by selecting cell content which spans multiple cells.
  2. You will be able to highlight with custom colors and styles elements which have certain profiling attributes with certain values set on them.
  3. The Oxygen Eclipse Plugin distribution will be updated to have a validation stripe showing all errors found in the visual Author editing mode. The Author visual editing mode will also have a validation status which will show the error closest to the caret position.
  4. We added API which allows you to programatically import an XML options file in the started application. Used with a plugin deployed as an add-on this API allows you to distribute a fixed set of options as a starting point to all users. Our Plugins SDK will contain such a sample plugin which makes use of the new API to distribute.
So what would be your biggest feature-request wish for the upcoming Oxygen XML Author 16.0?