The oracle.help.engine.XMLMapConventionEngine Help Engine Optimizing Dynamic Maps

Topic Files 8-7 Setting engineParams for either of the convention-based engines ensures that the helpset will only try to resolve topics if they start with a valid prefix, preventing an attempted connection to an URL. Failure to set engineParams will not break your help system, but performance will not be optimal. 8-8 Oracle Fusion Middleware Developers Guide for Oracle Help 9 Oracle Help for the Web Configuration File 9-1 9 Oracle Help for the Web Configuration File The Oracle Help for the Web configuration file is an XML file that defines a OHW configuration. This configuration controls all adjustable features of the OHW-RC and OHW-UIX servlet. A typical name for this file is ohwconfig.xml, but it can have any name, as long as that name is specified as the value of the configFileName initialization parameter for the servlet. The OHW-UIX and OHW-RC demonstration files uses ohwconfig.xml. The configuration file consists of the following elements and their child elements: ■ Section 9.1, The helpConfiguration Element ■ Section 9.2, The brandings Element ■ Section 9.3, The locales Element ■ Section 9.4, Sharing Resources Across Helpsets ■ Section 9.5, The parameters Element ■ Section 9.6, The navigatorAliases Element ■ Section 9.7, Custom Protocol Links ■ Section 9.8, Preloading Helpsets Containing Embedded Help

9.1 The helpConfiguration Element

The helpConfiguration element is the top-level element in the help configuration file. All of the elements of the configuration, described below, should appear between the helpConfiguration tag and the helpConfiguration tag. The helpConfiguration element has two attributes, version and debugMode. You must always set the version attribute of helpConfiguration element. For Oracle Help for the Web, the value of the attribute should be 2.0. For example: helpConfiguration version=2.0

9.1.1 The debugMode Attribute

Enable debug mode by setting debugMode=true on the helpConfiguration element in ohwconfig.xml. This allows helpsets to be loaded in debug mode, where malformed helpsets are skipped over. The debug text is displayed along with the branding information in the upper left corner of the screen and in the title bar of the 9-2 Oracle Fusion Middleware Developers Guide for Oracle Help browser. The debug text indicates how many malformed helpsets have been skipped over while running the application. If there are no malformed helpsets, following message is displayed in the branding area, also shown in Figure 9–1 : Debug Mode: 0 Missing Helpsets. Figure 9–1 Helpset Information in Debug Mode There could be many reasons for a malformed helpset. The following are some common reasons: ■ id attribute is missing ■ id attribute is a duplicate id ■ location attribute is missing ■ location points to an invalid location Whe you deploy the help system, a WARNING message is logged to indicate that debug mode is being used. Whenever a helpset is skipped over, a SEVERE message is logged instead of throwing an exception, and the log message displays the id and location attributes of the helpset that was skipped over. By default, the log messages are logged through System.err stream and are displayed in the developer environment’s console window. If youre using JDeveloper, the messages are logged in the Log window and a log file is created at JDEV_ HOME \jdeveloper\systemversion\DefaultDomain\servers\DefaultServ er\logs\DefaultDomain.log. For example: Let’s assume you enabled the debugMode as follows: helpConfiguration version=2.0 xmlns=http:xmlns.oracle.comhelpwebconfig debugMode=true Then, if you changed the location of your ohguide helpset to ohguide_new directory, but forgot to update the corresponding path in ohwconfig.xml: books helpSet id=ohguide location=ohguideohguide.hs helpSet id=shake location=shakespeareshakespeare.hs books The following message is displayed in the branding area, also shown in Figure 9–2 : Debug Mode: 1 Missing Helpsets. Figure 9–2 Missing Helpset Information in Debug Mode Oracle Help for the Web Configuration File 9-3

9.2 The brandings Element

The brandings element specifies the product branding text or image that appears above the tab bar. The brandings does not have any attributes, and is a placeholder for all brandings information. The brandings element can contain only one of the elements described in the following table. If no branding information is specified, the default branding text is used.