Architecting and designing : XML schema design : The XML diagram : Definition and symbol properties : XML attribute
  
XML attribute
Attributes are used to provide additional information about elements. Attributes often provide information that is not a part of the data.
Attributes should not be used as containers for data, because this will produce documents that are difficult to read and maintain. Attributes should only be used to provide information that is not relevant to the data.
Attribute values are difficult to test against a schema.
Unlike elements, attributes cannot contain multiple values.
Attributes are not easily expandable for future changes.
Unlike child elements, attributes cannot describe structures.
Attributes are more difficult to manipulate by program code.
Definition Properties
Description
Text in the Description field does not get generated to a DTD, but is generated to a BizTalk schema. You may enter a description of the modeling element, or its use in the schema. The description can be included in a report. By default, it is included in HTML reports.
XML Schema
Specifies one and only one schema that will be used throughout the diagram, and/or the XML Schema definition that elements and attributes are keyed to. Note that all elements and element attributes created on the diagram will default to this schema name. Attribute and element symbols may be keyed to one and only one schema. If the schema is renamed, all elements and attributes that use it will be rekeyed to the new name. “Names” may be the same as long as they are keyed to different schemas.
The attribute and element instances use the diagram's schema by default, however, this is not required. Element and attribute symbols using schema outside of the diagram's will display with dotted borders.
Attribute Type Properties
Data specified in an attributes Attribute Type properties apply to the instance of the attribute you are editing: the one which you see and have chosen on the diagram that you are in.
An attributes Attribute Type properties are not inherited across instances of the attribute: they are not global. In other words, all three instances of the attribute symbol address, even the first and third ones which share the same definition, will have different values in their Attribute Type properties.
Data Type
See Descriptions of data types.
Text Entity References
See also Text Entity References.
Required
Indicates if the attribute must be present on the element.
Text Entity References
See also Text Entity References.
Default
This refers to the default value for the attribute.
Values
This field is used only if the attributes data type is set to “enumeration”. Separate multiple items in the Values field with single spaces. On generation of BizTalk, these spaces are preserved. On generation of DTDs, spaces are replaced with vertical lines. On import of a DTD, the vertical lines are removed and replaced with spaces.
Text Entity Schema (XML Schema)
Text Entity Schema is used to resolve the text entity references in the properties of this object. If this value is blank, it uses the diagram schema.
Comments
Text in the Comments field will be generated into the schema file, formatted like this:
<!--your comments -->
Comments are generated to the place in the DTD where the attribute is used: see also Location of generated comments and processing instructions.
Processing Instructions
Processing instructions are inherited from an attribute type, if referenced, and passed to an application. They typically contain a declaration of the target application and whatever instructions the application needs to process the XML schema.
Text in the Processing Instructions field will be generated into the schema file but will be formatted as follows:
<?--your processing instructions-->
Processing Instructions are generated to the place in the schema where the attribute is used: see also Location of generated comments and processing instructions.
Description
Text in the Description field does not get generated to a DTD, but is generated to a BizTalk schema. You may enter a description of the modeling element, or its use in the schema. The description can be included in a report. By default, it is included in HTML reports.
Attribute Properties
XML Attribute Type
(BizTalk only)
In this field, one and only one XML Attribute Type may be assigned to an attribute instance. An XML Attribute Type is a schema level attribute that can be applied to element level XML Attributes.
Required Override
This field allows you to override the “Required” status provided to an element level attribute by a schema level Attribute Type definition.
Default Override
This field allows you to override the “Default” value provided to an element level attribute by a schema level Attribute Type definition.
Namespace Prefix
(BizTalk only)
Text in this field declares a URI (Universal Resource Identifier) for the instance of the element type. Allows you to ensure uniqueness among same named elements.
Comments
Text in this field will be generated into the schema file but will be formatted as follows:
<!--your comments -->
Comments are generated to the place in the DTD where the attribute is used: see also Location of generated comments and processing instructions.
Processing Instructions
Processing instructions are passed to an application. They typically contain a declaration of the target application and whatever instructions the application needs to process the XML schema.
Text in this field will be generated into the schema file, formatted like this:
<?--your processing instructions-->
Processing instructions are generated to the place in the schema where the attribute is used: see also Location of generated comments and processing instructions.
Graphic Comment
The Graphic Comment field enables you to provide a design comment on the symbol. Text entered into this field is displayed on the diagram next to the symbol. You can embed the text in the symbol by selecting the symbol and choosing Format, Symbol Format, Text Position, and toggling on the choice for Graphic Comment to be inside or outside the symbol. If the graphic comment is outside the symbol, you may specify that a squiggly line attach the comment to the symbol by selecting the symbol and choosing Format, Diagram Format, Notation, and toggling on the Line to Remote Text option.
Source Properties
Source Data
The dropped data element name.
Source Column
The dropped column name.
Source Attribute
The dropped attribute name.
Source Class Attribute
The dropped class attribute name.
See also
Definition and symbol properties