Attribute Properties

To view or edit an attribute's properties, double-click its diagram symbol or Browser or list entry. The property sheet tabs and fields listed here are those available by default, before any customization of the interface by you or an administrator.

The General tab contains the following properties:

Property

Description

Name/Code/Comment

Identify the object. The name should clearly convey the object's purpose to non-technical users, while the code, which is used for generating code or scripts, may be abbreviated, and should not normally include spaces. Neither the name nor code should contain colons. You can optionally add a comment to provide more detailed information about the object. By default the code is generated from the name by applying the naming conventions specified in the model options. To decouple name-code synchronization, click to release the = button to the right of the Code field.

Stereotype

Extends the semantics of the object. You can enter a stereotype directly in this field, or add stereotypes to the list by specifying them in an extension file.

Reference

Specifies a global attribute in this or another model to reuse. Disables Name, Code, Type, Default, and Fixed properties. Select a global attribute in the current model from the list or click the Browse tool to select an attribute from any model open in the workspace.

Type

Specifies the data type, which must be a qualified name. Select a built-in data type from the list or click the Browse tool to select a simple type defined in any model open in the workspace.

Embedded Type

[XSD only] Creates a <simple type> tag in the schema within the <attribute> tag. Resets the Type property to <None>.

Derivation

[XSD only] Specifies a derivation method for the data type to extend or restrict its values. Resets the Type property to <None>. Click the Properties tool to further define the derivation (see Derivations: Extensions, Restrictions, Lists and Unions (XSM)).

Keywords

Provide a way of loosely grouping objects through tagging. To enter multiple keywords, separate them with commas.

Detail Tab

The Detail tab of an attribute property sheet displays the following properties:

Property

Description

Default

Specifies a default value for the attribute. Mutually exclusive with the Fixed property.

Fixed

Specifies a fixed value for the attribute. Mutually exclusive with the Default property.

Use

Specifies how the attribute can be used. Select from:
  • Optional - the attribute is optional and may have any value.
  • Prohibited - the attribute cannot be used. Use this value to prohibit the use of an existing attribute in the restriction of another complex type.
  • Required - the attribute must appear at least once and may have any value matching its data type.

Form

Specifies whether or not the attribute must be qualified by combining the target namespace of the schema with the no-colon-name of the attribute.

ID

Specifies the ID of the attribute, which must be unique within the model.

Attribute Property Sheet Values Tab

The Values tab of an attribute property sheet is only available in a model targeted with DTD or XDR. You can set a list of predefined values for an attribute.

Note: In a model targeted with the XML-Data Reduced language, there is also a Values tab in the element property sheet.

XDR Attribute Properties

In an XML-Data Reduced language model, attributes tags are defined as follows:

XDR Attribute Attribute

Description

name

Specifies the name of the attribute.

General tab: Name

default

Specifies a default value for the attribute.

Detail tab: Default

dt:type

Specifies a type for the attribute.

General tab: Type

dt:values

To specify a list of available values for a global attribute

Values tab

type

Specifies the name of a global attribute as a reference for a local attribute.

General tab: Reference