Moxi Media Inc.
<THEME-CONFIG> Discussion Forum
IMF Developer's Guide » Theme Configuration » <THEME-CONFIG>  

A theme configuration XML file is used to create a list of different views of the data. A theme may be a predetermined set of visible layers, completely different layers, a different extent, different buttons, titles, and tools, etc.

If themes are defined, an IMF script can be used to display the names and descriptions of alternate themes. When the user selects a theme, the site refreshes to show the selected view of the data. This is particularly useful for organizing a complex set of data for the user, and give them the option to display a "Recreation" theme for example, which turns on a set of layers relating to recreation without changing the map extent.

The process behind this is simple. All you need to do is set up a separate site and map configuration file with the proper settings, and create a theme configuration XML file that refers to the configurations. In each of the site configuration files, refer to the theme configuration XML in the <THEME-CONFIG-XML> element.

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>

Although the format of the configuration file is simple, you may wish to use an XML editing tool like XMLSPY to create, edit, and validate your XML against the schema for this file format.

The schema for the site configuration XML is located at:

Your XML documents can be validated against the schema on Moxi Media's server, or a copy of the file installed on yours. To specify that the file be validated when working with an XML editor, use the following format:

<?xml version="1.0" encoding="UTF-8"?>
<THEME-CONFIG xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xsi:noNamespaceSchemaLocation="http://www.moximedia.com/docs/imf-ows/1.3/theme-config.xsd">
<!-- all your configuration stuff goes here -->
</THEME-CONFIG>

It may be better for you to validate against the schema that you downloaded with IMF so that it exactly matches your version of the software. If you have your xml document in a subdirectory of the sites folder, your validation would be like:

<?xml version="1.0" encoding="UTF-8"?>
<THEME-CONFIG xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xsi:noNamespaceSchemaLocation="../../schema/theme-config.xsd">
<!-- all your configuration stuff goes here -->
</THEME-CONFIG>

Frequency Child Elements
R+ <THEME>
   

Frequency Description (in this context)
R+ The <THEME-CONFIG> element contain one or more <THEME> elements.
   

Example:

<THEME-CONFIG>
  <THEME name="Ecology"
         description="Displays ecological layers and related information."
         site-config-xml="ecology-site.xml"
         same-extent="true" />
  <THEME name="Recreation"
         description="Displays hunting, fishing, and campground information."
         site-config-xml="recreation-site.xml"
         same-extent="true" />
</THEME-CONFIG>

Valid HTML 4.01!