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 |
Name of an attribute in the current model or another model opened in the workspace. A reference allows you to reuse an attribute with all its properties without having to define it again. Use the list to select an attribute in the current model. Use the Browse tool to select an attribute from any model opened in the workspace. If you select an attribute from another model, a shortcut is created with the referencing attribute. When you define a reference, the name and code are those of the target attribute and these properties are grayed. |
Type |
Attribute data type, which must be a qualified name. Use the list to select a built-in data type. Use the Browse tool to select a simple type defined in the current model or another model opened in the workspace. |
Embedded Type |
If selected, the attribute data type disappears and a <simple type> tag is created in the schema within the <attribute> tag. Only available in a model targeted with XSD. |
Derivation |
Derivation method for the attribute data type. Used to extend or restrict the values of the attribute data type. When you define a derivation, the data type disappears. You must click Apply and then the Properties tool to select a type, a base type or member types for the corresponding derivation (list, restriction or union). Only available in a model targeted with XSD. |
The Detail tab of an attribute property sheet displays the following properties:
Property |
Description |
---|---|
Default |
Default value. Enter a default value only if there is no fixed value. |
Fixed |
Fixed value. Enter a fixed value only if there is no default value. |
Use |
Indicator of how the attribute is used. If you select Optional, the attribute is optional and may have any value. If you select Prohibited, the attribute cannot be used. Use this value to prohibit the use of an existing attribute in the restriction of another complex type. If you select Required, the attribute must appear at least once and may have any value matching its data type. |
Form |
Form of the attribute. If you select Qualified, Form must be qualified by combining the target namespace of the schema with the no-colon-name of the attribute. If you select Unqualified, Form is not required to be qualified with the namespace prefix and is matched against the no-colon-name of the attribute. |
ID |
ID of the attribute. Its value must be of type ID and unique within the model containing the attribute. |
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.
In a model targeted with the XML-Data Reduced language, there is also a Values tab in the element property sheet.
In an XML-Data Reduced language model, attributes tags are defined by different attributes:
XDR attribute attribute |
Description |
---|---|
name |
Specifies the name of the attribute. Tab: General Field: Name |
default |
Specifies a default value for the attribute. Tab: Detail Field: Default |
dt:type |
Specifies a type for the attribute. Tab: General Field: Type |
dt:values |
To specify a list of available values for a global attribute Tab: General Field: Values |
type |
Specifies the name of a global attribute as a reference for a local attribute. Tab: General Field: Reference |
The following example shows an XDR file: