Skip to Main Content
XML Schema
book

XML Schema

by Eric van der Vlist
June 2002
Intermediate to advanced content levelIntermediate to advanced
396 pages
11h 8m
English
O'Reilly Media, Inc.
Content preview from XML Schema

Name

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

Synopsis

<xs:group
           name               = xs:NCName
           >
           Content: (xs:annotation?, (xs:all | xs:choice | xs:sequence))
</xs:group>

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

Description

Groups of elements can be globally defined and used as containers, which can be referenced elsewhere in this schema or in other schemas. These containers, which are almost free of semantics, are very flexible and may be used as building blocks for the definition of local or global complex types.

Being global components, they can also be used to encapsulate element definitions that cannot be made global, such as unqualified elements in a schema with target namespaces, multiple elements with the same name in a schema, elements that should not be used as document elements, or elements that should be redefined through xs:redefine in other schemas.

Element groups can be redefined through xs:redefine; the redefinition can be either a restriction (similar to a complex type derivation by restriction) or an extension. (This is more flexible than a complex type extension since the location where the base group is included in the new group can be chosen, while the new elements are always located after the base type during a derivation by extension.)

Any of the three compositors (xs:all, xs:sequence, or xs:choice) may be used to create an element group.

Restrictions

When a group is created using a xs:all

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

XML in a Nutshell, 3rd Edition

XML in a Nutshell, 3rd Edition

Elliotte Rusty Harold, W. Scott Means
Beginning XML, 5th Edition

Beginning XML, 5th Edition

Danny Ayers, Liam R.E. Quin, Joe Fawcett
XML Schema Complete Reference, The

XML Schema Complete Reference, The

Cliff Binstock, Chris Galtenberg, Mike Wooding, Chris Dix, Mitchell Smith, Dave Peterson
Programming Web Services with SOAP

Programming Web Services with SOAP

James Snell, Doug Tidwell, Pavel Kulchenko

Publisher Resources

ISBN: 0596002521Supplemental ContentErrata Page