Chapter 3 Building an XML model


Creating a group particle

There are different ways to create a group particle.

From an element property sheet

The same procedure applies for groups and complex types.

Steps To create a group particle from an element property sheet:

  1. Select a group particle from the Group type dropdown listbox of the element property sheet.
  2. Click OK.

    The element symbol appears selected, with an Expand tab (+) on its right side.
  3. Click an empty space in the diagram, to deselect the element symbol, and click the Expand tab (+) to reveal the group particle symbol and its link with the element symbol.


    Note the Collapse tab (-) on the right side of the element symbol. If you click it, the group particle symbol and its link are replaced by an Expand tab (+).


    Click the Expand tab (+) to recover the group particle symbol and its link.
  4. Double-click the group particle symbol to display the group particle property sheet.
  5. Select the Items page to display a list of items.
  6. Click the Add Element tool for each child element you create in the list.

    or

    Click an empty row in the list for each child element you want to create.
  7. Click OK.

    The group particle symbol appears selected, with an Expand tab on its right side.
  8. Click an empty space in the diagram, to deselect the group particle symbol, and click the Expand tab to reveal the child element symbols and their link.

Note   Name and code uniqueness
To respect the name and code uniqueness within a namespace, child elements are defined within an internal namespace which is their parent element. Therefore, there cannot be a conflict between a parent and a child name.

For more information on the namespace concept, see section Managing the namespace in models, in chapter Managing Models of the General Features Guide .

From the palette

Steps To create a group particle from the palette:

  1. Select a group particle tool in the palette.
  2. Click the element symbol in the diagram.

    The group particle symbol appears in the diagram, linked to the element symbol.
  3. Click the Element tool in the palette.
  4. Click the group particle symbol in the diagram for each child element you need.

    The child elements appear one by one in the diagram, linked to the group particle symbol.
  5. Right-click to recover the Pointer.

Note   Clicking an element symbol with the Element tool
When you click an element symbol with the Element tool, a sequence symbol (by default) appears in the diagram between the parent element and the child element.
To add other child elements, click the sequence symbol with the Element tool.
To change the group particle, double-click the sequence symbol to display its property sheet, then select another group particle in the Type dropdown listbox and click OK.

 


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