|
| Theme Configuration Reference | Discussion Forum |
| IMF Developer's Guide » Theme Configuration |
A theme configuration XML file is used to specify a set of configuration files used by IMF to change data views from within the application. Themes are given names that can be chosen by a user to see a preset set of data, usually at the same extent as the current view.
The <theme-config> element is the topmost tag of a theme configuration XML file. The elements of the theme configuration file must be enclosed in a <theme-config> element tag:
<?xml version="1.0" encoding="UTF-8"?> <theme-config> <!-- all your configuration stuff goes here --> </theme-config>
For best results, and to avoid making errors when working with the configuration files, use an XML editing tool like XMLSPY to create, edit, and validate your XML against the schema for the theme configuration XML file format. The Home Edition works well, and is free.
Your XML documents should be validated against the schema that you have in the config directory of your IMF distribution. To specify that the file be validated when working with an XML editor, use something like the following in your theme configuration documents:
<?xml version="1.0" encoding="UTF-8"?>
<theme-config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="c:/imf-aims51/config/theme-config.xsd">
<!-- all your configuration stuff goes here -->
</theme-config>
It is recommended that you use a relative file location for the schema instead
of a complete file path. For example, if your configuration files are in a sub-folder
of the $IMF/sites directory, you could use:
<?xml version="1.0" encoding="UTF-8"?>
<theme-config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../config/theme-config.xsd">
<!-- all your configuration stuff goes here -->
</theme-config>
|
|
Example:
<?xml version="1.0" encoding="UTF-8"?> <theme-config> <theme name="Theme One" description="Description of theme one." site-config-xml="site-config-one.xml" same-extent="true"/> <theme name="Theme Two" description="Description of theme two." site-config-xml="site-config-two.xml" same-extent="true"/> </theme-config>