Attribute groups are useful for grouping together attributes.
The following example creates an attribute group, testMethods
.
<xs:attributeGroup name="testMethods" /> <xs:attribute name="writeVisualBasicCode" use="required" /> <xs:attribute name="blackbox" use="optional" /> <xs:attribute name="writeScriptCode" use="required" /> </xs:attributeGroup>
If you want to reference the group of attributes for a full name on an element, you must add a reference to it using the ref attribute of the attributeGroup element.
The following example references a global attribute group, testMethods
.
<xs:element name="testSuite"> <xs:complexType> <xs:attributeGroup ref="testMethods" /> </xs:complexType> </xs:element>