O'Reilly logo

Definitive XML Schema by Priscilla Walmsley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 15 Reusable groups

XML Schema provides the ability to define groups of element and attribute declarations that are reusable by many complex types. Named model groups are fragments of content models, and attribute groups are bundles of attributes that are commonly used together. This chapter explains how to define and reference named model groups and attribute groups.

15.1 Why reusable groups?

Defining a group and reusing it many times has the advantages of:

• encouraging consistency across schema components,

• allowing the schema author to change the content model in only one place,

• making it obvious that certain complex types share similar children,

• in many cases, making the schema less verbose.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required