Chapter 3 Building XML Models


Attribute property sheet General tab

The General tab contains the following properties:

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 attribute
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 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, name and code properties are grayed. The name and code are those of the target attribute
Type Attribute data type. It must be a qualified name (See Glossary). 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

Defining attributes in XDR files

In a model targeted with the XML-Data Reduced language, 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: Values
type Specifies the name of a global attribute as a reference for a local attribute.

Tab: General

Field: Reference

Example of an XDR file:


 


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