Attribute and Attribute Reference Properties in XML Schemas

Both global and local attributes have the properties described in the Table 44. 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 44. Attribute and Attribute Reference Properties

XML Applications

XML Applications are software applications that process data using standard XML technologies like XML, XML Schema, XSLT and XQuery. Using Stylus Studio XML Pipeline, learn how to model, edit, test and deploy an XML Application with ease.

XSD Mapping

Stylus Studio® includes a visual XSD-to-XSD mapping tool that allows you to easily implement sophisticated XML data mappings involving multiple data sources and customized data processing using either XSLT or XQuery code.

Insurance Companies That Use Stylus Studio

Everyone needs insurance, even insurance companies. That's why these top insurance companies are insured when it comes to XML. Come see which insurance providers are insured by the power of Stylus Studio!

XSL:FO Editor

The XSL-FO editor provides syntax help, code completion integrated PDF preview, and integration with industry-leading XSL-FO processors including RenderX XEP and Apache FOP. Simplify XSL FO development with Stylus Studio.

Stylus Most Wanted

 
Free Stylus Studio XML Training:
W3C Member