attribute

MSXML 5.0 SDK

Microsoft XML Core Services (MSXML) 5.0 for Microsoft Office - XML Schemas

attribute

The XML-Data Reduced (XDR) schema element that refers to a declared attribute type that can appear within the scope of the named ElementType element.

<attribute
  default="default-value" 
  type="attribute-type"
  [required="{yes | no}"]> 

Attributes

default
The default value for the attribute. This specified default takes precedence over any default provided on the AttributeType element it refers to.
type
The name of an AttributeType element defined in this schema (or another schema indicated by the specified namespace). The supplied value must correspond to the name attribute on the AttributeType element. The type can include a namespace prefix.
required
An indicator of whether the attribute must be present on the element. Optional if the required attribute is present on the referenced AttributeType.

Element Information

Number of occurrences Number of attribute types specified in the schema.
Parent elements ElementType
Child elements (No child elements.)

Remarks

When the required attribute is set to yes and the default attribute specifies a default value, the supplied default value must always be the value; documents containing other attribute values are invalid.

When the required attribute is set to yes and no default is specified, each element whose type is declared to have the attribute must supply its value.

See Also

AttributeType | XDR Schema Elements | XDR Schema Data Types Reference