Element Properties

You can modify an object's properties from its property sheet. To open an element property sheet, double-click its diagram symbol or its Browser entry in the Elements folder. The following sections detail the property sheet tabs that contain the properties most commonly entered for elements.

The General tab of an XSD or DTD element property sheet displays the following properties (for XDR element properties, see the subsequent table):

Property

Description

Name

The name of the item which should be clear and meaningful, and should convey the item's purpose to non-technical users

Code

The technical name of the item used for generating code or scripts, which may be abbreviated, and should not generally include spaces

Comment

Descriptive label of the element

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 global element. The current element will have the same properties as the global element. The Reference property is only available for child elements. Use the list to select a global element in the current model, or the Browse tool to select a global element from any open model. If you select a global element from another model, a shortcut is created with the referencing element. When you define a reference, name and code properties are grayed. Name and code are those of the global element.

Once you have referenced an element, you can locate it in the diagram by right-clicking the referencing element symbol and selecting Find Referenced Element in the contextual menu. The referenced element is displayed with handles in the diagram.

Group type

Specifies that the element has child elements, and how they are used. You can choose between:


Type

Element data type. Use the list to select a built-in data type. Use the Browse tool to select a simple or a complex type from any model opened in the current workspace. In the case of an XSD, selecting a data type will delete any group particle (and its child elements) or attribute previously defined in the element property sheet. Do not select a data type if you want to define attributes or child elements within the current element

Embedded type

[XSD only] Locally defined data type. It applies to the current element only. Automatically set to Complex if you define a derivation for the element data type.

Content

[XSD only] Content type of the element. If you select Complex, the element can have child elements. If you select Simple, the element cannot have child elements.

Derivation

[XSD only] Derivation method for the element data type. Used to extend or restrict the values of the element data type. When you define a derivation, the data type disappears. You must click Apply and then the Properties tool to select a base type in the derivation property sheet. See Derivations: Extensions, Restrictions, Lists and Unions (XSM).

Defining Elements in XDR Files

In a model targeted with the XML-Data Reduced language, elements are defined by different attributes:

XDR element attribute

Description

Model

Specifies if an element can contain new local elements. Possible values are:


  • closed – [default]

  • open - if an "Any" element is attached to the element. See Any Elements (XSM)

Tab: N/A

Content

Specifies the content type. Possible values are:


  • mixed - a group particle and a data type are defined

  • eltOnly - a group particle is defined without a data type

  • textOnly - a data type is defined without a group particle

  • empty – neither group particle nor data type are defined

Tab: General

Field: Group type, Type

Order

Specifies how child elements are organized within a parent element. Possible values are:


  • seq - sequence group particle

  • one - choice group particle

  • many - all group particle

Tab: General

Field: Group type

dt:type

Specifies a data type.

Tab: General

Field: Type

dt:values

Specifies a list of possible element values.

Tab: Values

type

[local elements only] Specifies the name of a global element as reference for the local element

Tab: General

Field: Reference

minOccurs

[local elements only] To specify the minimum number of occurrences for a local element. Usually set to 0 or 1

Tab: Detail

Field: Minimum

maxOccurs

[local elements only] To specify the maximum number of occurrences for a local element. Usually set to 1 or * (unbounded)

Tab: General

Field: Maximum

Example of an XDR file:




Created October 7, 2009. Send feedback on this help topic to Sybase Technical Publications: pubs@sybase.com