Map-set Introduction

A map-set, as the name suggests, is a set of mappings. Each map is a Display Key to Data. E.g. "United Kingdom" (display key) to "UK" (data), "Germany" (key) to "D" (data).

SYNTAX

FOX uses XML Schema Enumerations for Drop Downs / Lists Of Values (LOV) on screens. They are satisfactory for simple uses, but static and inflexible for sophisticated applications.

A map-set behaves like an Enumeration LOV, but is highly dynamic in nature.
When above map-set is associated with xs:element definition and set-out on screen:

Here the data value is a simple type (xs:string), but it can also be a complex collection.

Map-set data is stored in a specific XML Data structure in the module schema as shown here:

 

For the countries example mentioned above the data would have the following structure:

The key in a map set is always an xs:string but the data element can be of any type, including a complex type. The data for the countries example looks like this:

An example of where the data is a complex data structure is the following:

And the data:

Fox manages the map-set data structures automatically using a set of rules (details later):

Map-sets are utilised by display widgets, fm:validate and fm:context-localise (covered later).