9.2. An Example of a Named Attribute-use Group

A named attribute-use group provides a way to specify a set of attribute types that presumably apply to multiple complex types. Listing 9.2 portrays the named attribute-use group saleAttributeGroup. In addition, the listing demonstrates the complex types freePriceType and salePriceType, both of which reference saleAttributeGroup.

Listing 9.2. A Named Attribute-use Group (pricing.xsd)
 <xsd:attributeGroup name="saleAttributeGroup" id="pricing.sale.ag"> <xsd:annotation> <xsd:documentation xml:lang="en"> Anything that is on sale (or free, which is a type of sale) must have an authorization defined. This is someone's name, initials, ID, etc. </xsd:documentation> </xsd:annotation> <xsd:attribute name="employeeAuthorization" ...

Get XML Schema Complete Reference, The 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.