Chapter 3 Building an XML model


Defining group properties

There are global and referencing groups:

Note   Groups in DTD and XDR files
In a model targeted with DTD or XDR language, there are no global or referencing groups, although they appear on the diagram.
Groups are expanded within their parent element and their child elements are declared individually as global elements. (See generated DTD and XDR files in Defining a group of elements)

To display a group property sheet, double-click its symbol in a diagram.

The General page of a group property sheet displays the following properties:

Property Description
Name Name of the group. It must be a no-colon-name (See Glossary). Required when the group is global
Code Code of the group. It must be a no-colon-name. Required when the group is global
Comment Descriptive label for the group
Stereotype Sub-classification used to extend the semantics of an object without changing its structure. It can be predefined or user-defined
Reference Name of a group in the current model or another model opened in the workspace. It must be a qualified name (See Glossary). A reference allows you to reuse a group with all its properties without having to define it again. Use the dropdown listbox to select a group in the current model. Use the Browse tool to select a group from any model opened in the workspace. If you select a group from another model, a shortcut is created with the referencing group. When a reference is defined, the name and code properties are grayed. The name and code are those of the target group
Group type Indicator that specifies how child elements are to be used within the group. Select a group particle (all, choice or sequence)
Minimum Minimum number of times the group can occur. To specify that the group is optional, set this attribute to zero
Maximum Maximum number of times the group can occur. For an unlimited number of times, select unbounded
ID ID of the group. Its value must be of type ID and unique within the model containing this group

Once you have defined the reference of a referencing group, you can locate the referenced group in the diagram by right-clicking the referencing group symbol and selecting Find Referenced Group in the contextual menu. The referenced group appears with handles in the diagram.

You can access directly to the Preview page of a group property sheet. Right-click a group (or a referencing group) symbol in the diagram and select Preview in the contextual menu.

 


Copyright (C) 2005. Sybase Inc. All rights reserved.