Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

XML Schema attributeGroup Element

XML Schema attributeGroup Element


XML Schema Reference Manual Complete XML Schema Reference Manual


Definition and Usage

The attributeGroup element is used to group attribute declarations so that they can be incorporated into complex types as a group.

Element Information

Syntax

id=ID

name=NCName

ref=QName

any attributes

(annotation?),((attribute|attributeGroup)*,anyAttribute?))

(The ? symbol declares that within the attributeGroup element, the element can appear zero or one time; the * symbol declares that the element can appear zero or more times.)

property Description
id Optional. Specifies a unique ID for the element.
name Optional. Specifies the name of the attribute group. The name and ref attributes cannot both be present.
ref Optional. Specifies a reference to a specified attribute group. The name and ref attributes cannot both be present.
any attributes Optional. Specifies any other attributes with a non-schema namespace.

Example 1

  

  

  

The example above defines an attribute group named "personattr", used in a complex type named "person".


XML Schema Reference Manual Complete XML Schema Reference Manual