Home · All Classes · Grouped Classes · Annotated · Functions

Help Browser Preprocessor

Introduction

The Help Browser includes a preprocessor that allows a single source of html help files from which device-specific help can be extracted for presentation to the user. This allows packages to be distributed with on-line help that adapts to the user's actual device.

Syntax

The supported syntax is a subset of Server Side Includes (SSI). This syntax was chosen so that the documentation can alternatively be served by an appropriately-configured web browser.

Flow Control

SSI if-else-endif can be used (but not elif), with the expression being a set of variable references separated by "||". Variables that are non-empty are "true" and variables that are empty (or not defined) are "false".

    <!--#if expr="$CELL || $VOIP"-->
    ...
    <!--#else-->
    ...
    <!--#endif-->

The following variables are pre-defined (or not, depending on configuration) for Qtopia Documentation:

Variable Substitution

The string

    <!--#echo var="MYVAR"-->

is replaced with the value of the variable MYVAR.

The syntax for setting a variable is:

    <!--#set var="MYVAR" value="some text"-->

It is usually useful to define variables inside configuration blocks. Like this:

    <!--#if expr="$CELL"-->
     <!--#set var="YOURDEV" value="your cellphone"-->
    <!--#else-->
     <!--#if expr="$TELEPHONY"-->
      <!--#set var="YOURDEV" value="the phone"-->
     <!--#else-->
      <!--#set var="YOURDEV" value="the device"-->
     <!--#endif-->
    <!--#endif-->
    ...
    Do not wash <!--#echo var="YOURDEV"-->!

File Inclusion

The string

    <!--#include file="FILENAME"-->

is replaced with the contents of the file FILENAME, which is recursively processed in the manner described here.

One use for this is device-specific documentation. The Qtopia help attempts to put anything that might vary between devices into a device-specific file. These files all start with "device-" (such as "device-keys.html" and "device-name.html"). By replacing these files, the Qtopia help can document a different device.

Examples

    <!--#if expr="$CELL"-->
    Stuff for the cell phone...
    <!--#endif-->
    <!--#if expr="$TELEPHONY"-->
    Stuff for any Phone
    <!--#if expr="$KEYPAD"-->
    Stuff for a Keypad Phone
    <!--#endif-->
    <!--#endif-->
    <!--#include file="device-colors.html"-->
    Press the <!--#echo var="color-offswitch"--> button to turn off the device.


Copyright © 2008 Nokia Trademarks
Qtopia 4.3.3