The main window of the Format Builder is split into two panes. The left pane shows the structural information for the data format. The right pane shows the detail for the item selected in the left pane.
You can navigate in and execute commands from the main window by using one of the following methods:
The Menu bar displays the menu headings. The menus that are available depend on what is selected in the left pane. You can open menus from the menu bar or by holding down the ALT key while pressing the underscored letter in the menu heading. For example, pressing ALT + F opens the File Menu.
For a complete description of the menu commands, see Chapter 19, "Format Builder Menus"
The Format Builder toolbar provides buttons that access some of the frequently used commands in the menus. If a command is unavailable, its button appears "grayed-out."
The toolbar buttons provided with Format Builder are described below:
Table 10-1 List of Toolbar Buttons
Toolbar Button Name | Description |
---|---|
New |
Creates a new Message Format |
Open/Retrieve |
Opens an existing Message Format. |
Save/Store |
Saves the current Message Format |
Cut |
Removes the item currently selected in the left-hand pane, and its child objects, from the tree. Note: This action is not available if the Message Format (root) item is selected. |
Copy |
Makes a copy of the item currently selected in the left-hand pane for insertion elsewhere in the tree. Note: This action is not available if the Message Format (root) item is selected. |
Paste as Sibling |
Inserts the cut or copied item as a sibling object of the selected item. |
Paste as Reference |
Inserts a reference to the cut or copied item as a sibling object of the selected item. |
Undo |
Reverses the previous action. The tool tip changes to indicate the action that can be undone. For example, changing the name of a field to Field1 and clicking Apply causes the tool tip to read "Undo Apply Field Field1". Note: Format Builder supports multi-level undoing and redoing. |
Redo |
Reverses the effects of an Undo command. The tool tip changes to indicate the action that can be redone. For example, changing the name of a field to Field1 and then undoing that action causes the tool tip to read "Redo Apply Field Field1". Note: Format Builder support multi-level undoing and redoing. |
Insert Field |
Inserts a field as a sibling of the item selected in the tree pane. |
Insert Group |
Inserts a group as a sibling of the item selected in the tree pane. |
Insert Comment |
Inserts a comment as a sibling of the item selected in the tree pane. |
Move Up |
Moves the selected item up one position under its parent. |
Move Down |
Moves the selected item down one position under its parent. |
Promote item |
Promotes the selected item to the next highest level in the tree. For example, Field1 is the child object of Group1. Selecting Field1 and clicking the Promote tool makes it a sibling of Group1. |
Demote item |
Demotes the selected item to the next lower level in the tree. For example, Group1 is the sibling of Field1. Field1 immediately follows Group1 in the tree. Selecting Field1 and clicking the Demote tool makes it a child of Group1. |
Expand All |
Expands all items in the tree pane to show child items. |
Collapse All |
Collapses the tree pane to show first level items only. |
Format Tester |
Opens the Chapter 18, "Format Tester" |
The Tree Pane represents hierarchical/structural information about the format of the non-XML data in a tree. The root node of the tree will correspond to the MFL document being created or edited. The root node is referred to as the Message node. Child nodes are labeled with group or field names. Fields are represented by leaf nodes in the tree. Groups contain fields or other groups and are represented by non-leaf nodes in the tree.
The icon for each node encapsulates information about the node. The icon indicates whether the node represents a message, a group, a field, a comment, or a reference. The icon also indicates whether a group or field is repeating, whether a group is a Group Choice, and whether a group or field is optional or mandatory. You also have the ability to add, delete, move, copy, or rename nodes in the tree. This is done through the menus or the toolbar (see Section 10.1, "Using the Menu Bar," Section 10.2, "Using the Toolbar,"
and Section 10.4, "Using the Shortcut Menus"
).
The icons that appear in the Tree Pane are described in the following table.
Table 10-2 Tree Icon Descriptions
Tree Icon Name | Description |
---|---|
Message Format |
The top level element. |
Group |
Collections of fields, comments, and other groups or references that are related in some way (for example, the fields |
Optional Group |
A group that may or may not be included in the message format. |
Repeating Group |
A group that has one or more occurrences. |
Optional Repeating Group |
A group that may or may not be included, but if included, occurs more than once. |
Group Reference |
Indicates that another instance of the group exists in the data. Reference groups have the same format as the original group, but you can change the optional setting and the occurrence setting for the reference group. |
Group Choice |
Indicates that only one of the items in the group will be included in the message format. |
Field |
Sequence of bytes that have some meaning to an application. (For example, the field |
Optional Field |
A field that may or may not be included in the message format. |
Repeating Field |
A field that has one or more occurrences. |
Field Reference |
Indicates that another instance of the field exists in the data. Reference fields have the same format as the original field, but you can change the optional setting and the occurrence setting for the reference field. |
Optional Repeating Field |
A field that may or may not be included, but, if included, occurs more than once in the message format. |
Comment |
Contains notes about the message format or the data transformed by the message format. |
Collapse |
A minus sign next to an object indicates that it can be collapsed. |
Expand |
A plus sign next to an object indicates that it can be expanded to show more objects. |
Instead of using the standard menus to find the command you need, use the right mouse button to click an item in the left pane. The menu that appears shows the most frequently used commands for that item.
For a complete description of the shortcut menu commands, see Section 19.7, "Shortcut Menu."
You can use the drag and drop feature of Format Builder to copy and/or move the items in the tree view.
To use drag and drop to move an item:
Select the item you want to move.
Press and hold the left mouse button while you drag the item to the desired location.
When the item is in the desired location, release the left mouse button. The item is moved to the new location.
To use drag and drop to copy an item:
Select the item you want to copy.
Press and hold the CTRL key.
Keeping the CTRL key depressed, press and hold the left mouse button while you drag the item to the desired location.
When the item is in the desired location, release the left mouse button and the CTRL key. A copy of the item is place at the new location.
Message formats, fields, and groups are identified by a name. This name is used as the XML tag when non-XML data is transformed to XML. Therefore the name must conform to the XML rules for a name.
The format guidelines for a name are as follows:
Must start with a letter or underscore.
Can contain letters, digits, colon, the period character, the hyphen character, or the underscore character.
The following are valid name examples:
MyField MyField1 MyField_again MyField-again
The following are invalid name examples:
1MyField
- may not start with a digit
My>Field
- the greater-than sign (>) is an illegal character
My Field
- a space is not permitted
My/Field
- the back slash (/
), which is an illegal character
My\Field
- the forward slash (\
), which is an illegal character
My:Field
- a semi-colon (;
), which is an illegal character