Download View this document as PDF

Transcript
CHAPTER 2: Building XML Diagrams
Derivations: Extensions, Restrictions, Lists and Unions (XSM)
You can use derivations to extend or restrict the values of elements and of simple and complex
types.
An XML model allows you to derive:
•
•
•
Elements by extension, restriction, list or union
Simple types by restriction, list or union
Complex types by extension or restriction
Note: When you define a derivation in an element property sheet, a simple or a complex type is
automatically created within the element declaration (See Preview tab). The Embedded type
property is automatically set to Simple or Complex, and the Content property to Simple or
Complex in the case of an embedded complex type.
Deriving by Extension
You can derive an element or complex type by extension to extend the values of its base type.
For example:
USaddress is a derivation by extension of the address complex type.
The generated schema is the following:
XML Modeling
61