Arbortext IsoDraw > User's Reference > Menus > Objects Menu > Select DTD > Structure of a DTD > Definition of Attributes
  
Definition of Attributes
Each object is automatically assigned a number of standard attributes which cannot be changed. These are
ID
Unique definition of the object
name
Name of the object, need not be unique
region
Hotspot attributes
viewcontext
The area which is to be displayed if the object is to be used as the target.
screentip
A text which is displayed if the user moves the mouse pointer over the object.
Other attributes can also be created. Each attribute consists of three expressions: the name of the attribute, the type of the attribute and information on whether this attribute must be used or not:
PartNo %string; #REQUIRED
This line defines an attribute named PartNo of type string. The expression #REQUIRED indicates that this attribute must be completed by the user. He can do this by means of the Validate objects function. The following data types have been predefined for attributes:
%string;
A character string
%float;
A floating point number
%integer;
An integer
ID
Unique ID, reserved for attribute ID
uri
A hyperlink
%special;
Reserved types for specific standard attributes
%defAttrs;
Reserved type for all standard attributes
An expression beginning with % and ending with ; is known as an entity (ENTITY). Entities are defined in the DTD. Arbortext IsoDraw recognizes the entities integer, float, string, and special, and applies rules in the object info which correspond to these types. The user is therefore unable to enter letters if the attribute has been declared as an integer. Further information on entities can be found in the enclosed DTDs or in the SGML literature.
An attribute list can be created with the specified data types. The minimum form of such a list is as follows:
<!ATTLIST SparePart
%defAttrs;
>
The elements are as follows
<!ATTLIST
Start of attribute list
SparePart
Name of associated object type
%defAttrs;
This object has the standard attributes
>
End of attribute list
An attribute list with additional attributes could take the following form:
<!ATTLIST SparePart
%defAttrs;
PartNo %string; #REQUIRED
<!-- An attribute “PartNo” of type string-->
Quantity %integer; #IMPLIED
<!-- An attribute “Quantity” of type quantity-->
Assembly uri #IMPLIED
<!-- An attribute “Assembly” of type hyperlink-->
>
The expression #IMPLIED appears if the attribute is not obligatory.