Types

Creating a Type

The Dictionary lets you create types in:

You can create new types in the dictionary and then use them in the SCHEMA. For elements that are used more than once, this is a good alternative to simply adding them directly in the SCHEMA.

It also lets you edit the type in one place (the dictionary) and have it affect all places where it is used as a type in the SCHEMA.

Example - Simple Type

Create a simple type PHONE_NUM in the dictionary and then use it twice in the schema.

  1. Open Dictionary Objects at the top and click Simple Types.

  2. Select Edit > Create a new item … > Schema Simple Type and fill out the box like this:

    Close the box.

  3. Click in the Type column for PHONE_NUM and select :string from the dropdown list.

  4. Click on another line in the top pane, and then click again on PHONE_NUM to refresh the bottom pane.

  5. Fill out the bottom pane like this:

  6. Return to the SCHEMA and click BT_ADDR1:

  7. Choose Edit > Add item > Schema Element and fill out the box like this.

    PHONE_NUM will be at the bottom of the drop-down list after the built-in types.

    There is no colon at the beginning of a type that you create.

    Finish adding the element.

  8. Add ST_PHONE_NUM after BT_PHONE_NUM

Example - Complex Type

Create a complex type CONTACT in the dictionary and then use it in the schema.

  1. Under Dictionary Objects, click Simple Types and create this type in the Simple Types dictionary:

    NAME Type :string Min 3 Max 20

  2. Under Dictionary Objects, click Complex Types.

  3. Select Edit > Create a new item … > Schema Complex Type and fill out the box like this:

    Close the box.

  4. Save.

  5. With CONTACT selected, choose Edit > Add item … > Schema Element and add this simple element:

  6. Highlight ContactName and add this after:

  7. Save.

Now use this type in the SCHEMA:

  1. Click ST_COUNTRY in the SCHEMA and choose Edit > Add item > Schema Element.

  2. Fill out the box like this:

  3. Save.

  4. Expand CONTACT_PERSON in the SCHEMA to see this:

    Notice the Italic ContactName and ContactPhone, indicating that these are being supplied from the Complex Types dictionary.

    You can use this type as often as you’d like. It is the same as having a local complex group that contains NAME and PHONE, only you can maintain it centrally from the dictionary.

Changing an Element’s Type

You can change an element’s type by: