enumeration element

Last update: 2023-08-01

Content model

enumeration:==(help| value)


  • @basetype (string)
  • @default (string)
  • @desc (string)
  • @label (string)
  • @name (string)
  • @template (string)




  • <help>
  • <value>


This element enables us to define a value enumeration. An enumeration belongs to the schema which it is defined in, but it is accessible via another schema.

Use and context of use

Enumerations are defined at the start of a schema (before the main element is defined).

Attribute description

  • basetype (string): type of the values stored in the enumeration.

    List of available types:

    • ANY
    • bin
    • blob
    • boolean
    • byte
    • CDATA
    • datetime
    • datetimetz
    • datetimenotz
    • date
    • DOMDocument
    • DOMElement
    • double
    • enum
    • float
    • html
    • int64
    • link
    • long
    • memo
    • percent
    • primarykey
    • short
    • string
    • time
    • timespan
    • uuid
  • default (string): Default value. The default value may also be one of the values defined in the enumeration.

  • desc (string): enumeration description.

  • label (string): enumeration label.

  • name (string): internal name of the enumeration.

  • template (string): this attribute defines a reference to an <enumeration> element shared by several schemas. The definition is automatically copied into the current schema.


Example of enumeration values whose values are stored in the database:

    <enumeration name="myEnum">
       <value name="One" value="1"/>
       <value name="Two" value="2"/>

    <element label="Sample" name="Sample">
       <attribute dbEnum="myEnum" length="100" name="Number" required="true" type="string"/>

Definition of an enumeration with a default value:

 <enumeration basetype="byte" default="email" name="canal">
    <value label="Email" name="email" value="0"/>
    <value label="Téléphone" name="phone" value="1"/>
    <value label="Call Center" name="callcenter" value="2"/>

On this page