Attribute and Attribute Reference Properties in XML Schemas

Both global and local attributes have the properties described in the Table 62. References to attributes have the same properties, except where noted.

Property
Description
Type
For attributes, the type is always Attribute. For attribute references, the type is always Ref. to Attribute.
Name
The attribute name you use in an instance document. Specify the name you want the attribute to have.
Data Type
The type of the data that is the value of the attribute. Select from all simpleTypes defined in an XML Schema, and all simpleTypes that you already defined in the same schema. References to attributes do not have this property.
Default
Specifies the default value for this attribute. Specification of this property makes sense only for optional attributes. If you specified optional for the Restrictions property, you can specify a default value.
If this attribute is in an instance document, the attribute has whatever value you specify. If you do not specify this attribute, the schema processor behaves as though you had specified it with the default value. When you specify a default value for an attribute, that attribute must be optional in an instance document. An attribute can have a value for the Default property or a value for the Fixed Value property. The two properties are mutually exclusive.
Fixed Value
When you specify a value for Fixed Value, it is optional for the attribute to appear in an instance document. However, if the attribute does appear, it must have the value specified by Fixed Value. Whether or not you specify this attribute in an instance document, the schema processor behaves as though you had specified this attribute with the fixed value. An attribute can have a value for the Fixed Value property or a value for the Default property. The two properties are mutually exclusive.
Restrictions
Specify prohibited, optional, or required.
Form
An attribute's form is either qualified or unqualified. A form of qualified means that each time the attribute is referenced in a schema document, you must specify the prefix of its namespace. Every attribute has a form attribute. If it is not explicitly defined, the schema processor checks the default attribute form specified for the Schema node.
Table 62. Attribute and Attribute Reference Properties

Microsoft .NET XML Tools for System.XML 1.0 and System.XML 2.0

Stylus Studio features integrated XML validation, XSLT transformation and XSLT debugging using the official Microsoft .NET XML processing components: System.XML 1.0 and System.XML 2.0.

XML Differencing

Stylus Studio's integrated XML Differencing tool visually computes and analyzes any changes made to files or folders in a highly configurable, XML-aware fashion. Display text or tree views, with changes displayed in a merged view or side-by-side!

Whitepaper: FIXML - Working with Complex Message Sets Defined Using XML Schema

The advanced XML Schema handling and presentation capabilities of Stylus Studio have valuable implications for users of industry-specific XML message sets.

Food & Beverage Services

"I'll have a burger and a side of Stylus Studio", says these top food & beverage services that use Stylus Studio in everyday operations. Come see which food & beverage services eat up the idea of having the most powerful XML IDE at their finger tips!

Stylus Most Wanted

 
Free Stylus Studio XML Training:
W3C Member