Element: FIELD

As XMLBooster generates a data structure declaration for every element specifed in the meta-definition file, field definitions specify how the various pieces of information gathered in the element must be aggregated into a usable data structure.

Attributes

Name Type Optional Values
NAME STRING No
SHORTDESC STRING Yes If set, this attribute's value overides the field's name when a label must be built for a user interface.
OVERRIDE STRING Yes This attribute, if used, denotes the name to be used to denote the field in the host language at hand. This serves essentially when the field name conflicts with the host language's reserved words.
INDICATOR STRING Yes This attribute, if used, must refer to a boolean field defined in the enclosing element, which will be marked as TRUE whenever the field receives a value as the result of parsing.
TYPE Yes INTEGER; LONG; STRING; PCHAR; REAL; ANY; BOOLEAN Specifies the predefined type (string, integer, etc.) if relevant. In some cases, the attribute's type is not one of these predefined types, and this attribute is then omitted
REFTYPE STRING Yes When an element refers to another element, the REFTYPE attribute must be used to indicate the type of this included element.
SIMPLETYPE STRING Yes When a field is of a user-defined simple type,the SIMPLETYPE attribute holds thename of this user-defined type.
ENUMTYPE STRING Yes When a field is denoted by an enumerated type, ENUMTYPE holds the name of the enumeration which must be defined within the same meta-definition file.
ARRAYSIZE INTEGER Yes When a field contains a fixed-size array of instances denoted by another element, ARRAYSIZE can be used to indicate the number of elements that can be stored in the array. If this attribute is not used, a default value for the system is used. If no such system-wide default value is specified, a constant value is used, depending on the target language at hand. If the field is not marked as being an array (using the MODE attribute), this attribute, if specified, is ignored.
REGEXP STRING Yes ARRAYSIZE can be used to specify a schema-like regular expression which will checked against values for the field at hand at parse time.

This feature is still under development, and might not be available for all code generators.

MODE Yes DEFAULT; LINKED; LIST; AGGREGATED; ARRAY
MAXLEN INTEGER Yes
MINLEN INTEGER Yes
ID BOOLEAN Yes
IDREF BOOLEAN Yes

Content

Optional DESCRIPTION
Sequence of
META
Permutation of
Optional FIELDGUIINFO
Optional FIELDDIFFINFO
Optional MININCLUSIVE
Optional MAXINCLUSIVE

Appears in

FIELDS

DTD declaration

<!ELEMENT FIELD
(DESCRIPTION?, (META)*, (FIELDGUIINFO?| FIELDDIFFINFO?| MININCLUSIVE?| MAXINCLUSIVE?)*)
>

<!ATTLIST FIELD
NAME CDATA #REQUIRED
SHORTDESC CDATA #IMPLIED
OVERRIDE CDATA #IMPLIED
INDICATOR CDATA #IMPLIED
TYPE (INTEGER|LONG|STRING|PCHAR|REAL|ANY|BOOLEAN) #IMPLIED
REFTYPE CDATA #IMPLIED
SIMPLETYPE CDATA #IMPLIED
ENUMTYPE CDATA #IMPLIED
ARRAYSIZE CDATA #IMPLIED
REGEXP CDATA #IMPLIED
MODE (DEFAULT|LINKED|LIST|AGGREGATED|ARRAY) #IMPLIED
MAXLEN CDATA #IMPLIED
MINLEN CDATA #IMPLIED
ID (TRUE|YES|yes|Y|y|ON|On|on|true|True|1|FALSE|NO|no|N|n|OFF|Off|off|false|False|0) #IMPLIED
IDREF (TRUE|YES|yes|Y|y|ON|On|on|true|True|1|FALSE|NO|no|N|n|OFF|Off|off|false|False|0) #IMPLIED
>