Name

xs:attributeGroup(global definition) — Global attributes group declaration that can be referenced within the same schema by other schemas.

Synopsis

<xs:attributeGroup
           id            = xs:ID
           name          = xs:NCName
           {any attributes with non-schema namespace}
           >
           Content: (xs:annotation?, ((xs:attribute | xs:attributeGroup)*,
                      xs:anyAttribute?))
</xs:attributeGroup>

May be included in: xs:redefine, xs:schema

Description

Attribute groups are global containers that embed groups of attributes. They can be used to manipulate groups of several attributes often used together, but also to provide global access to attributes that cannot be globally defined because they are unqualified or because several definitions cohabit in a single schema (see the example).

Attribute references or local definitions, attribute wildcards, and attribute group references may be included within attribute group definitions.

Attribute groups may be redefined through xs:redefine elements.

Restrictions

None.

Example

<xs:attributeGroup name="bookAttributes">
  <xs:attribute name="id" type="xs:ID"/>
  <xs:attribute name="available" type="xs:boolean"/>
</xs:attributeGroup>

Attributes

id

W3C XML Schema’s element ID.

name

Name of the attribute group.

Get XML Schema now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.