XML technologies / XML Schema / XML Schema element reference / xs:attributeGroup (reference)
(Excerpt from “XML Schema” by Eric van der Vlist)
Reference to a global attribute-group declaration.
<xs:attributeGroup
id = xs:ID
ref = xs:QName
{beliebige Attribute mit einem Nicht-Schema-Namensraum}
>
Content: (xs:annotation?)
</xs:attributeGroup>May occur within: xs:attributeGroup (global definition), xs:complexType (local definition), xs:complexType (global definition), xs:extension (complex content), xs:extension (simple content), xs:restriction (complex content), xs:restriction (simple content)
Description
Every occurrence of xs:attribute, except at the top level, references an attribute group, effectively replacing the reference with the attributes or attribute-group references in that group.
Restrictions
None.
Example
<xs:element name="book">
<xs:complexType>
<xs:sequence>
<xs:element ref="isbn"/>
<xs:element ref="title"/>
<xs:element ref="author" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="character" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attributeGroup ref="bookAttribute"/>
</xs:complexType>
</xs:element>Attributes
id
Element ID according to W3C XML Schema.
ref
Qualified name of the referenced attribute group.
Copyright © 2003 O'Reilly Verlag GmbH & Co. KG
You may print the online version for your private use.
Otherwise, this chapter from “XML Schema” is subject to the same conditions as the bound edition. The work, including all its parts, is protected by copyright. All rights reserved, including reproduction, translation, microfilming, and storage and processing in electronic systems.
O’Reilly Verlag GmbH & Co. KG, Balthasarstraße 81, 50670 Köln, kommentar(at)oreilly.de