Name
xs:redefine — Inclusion of a W3C XML Schema for the same namespace with possible override.
Synopsis
<xs:redefine id = xs:ID schemaLocation = xs:anyURI {any attributes with non-schema namespace} > Content: (xs:annotation | (xs:simpleType | xs:complexType | xs:group | xs:attributeGroup))* </xs:redefine>
May be included in: xs:schema
Description
xs:redefine
is similar to
xs:include
with one exception: the definition of
simple and complex types and attribute and element groups can be
changed. Changes performed on these components must lead to
components that are valid restrictions or extensions of the original
ones.
Simple and complex types are redefined using the usual mechanism of derivation: the new types must be defined as derivations by restriction or extension of their previous definition, which is considered to be the base type.
Element and attribute groups are redefined by giving a new definition, and may refer to themselves to indicate that the content of their original definition must be included. In this case, this self-reference is not considered a recursive definition (which is forbidden in element and attribute groups), but an extension of the original group.
When xs:redefine
is used and no redefinitions are
specified, its effect is similar to xs:include
.
Restrictions
xs:redefine
can be used only to include schemas with either the same target namespace or no target namespace. There is no equivalent to import and redefine schema definitions in a single operation. The ...
Get XML Schema 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.