Chapter 3 Building XML Models


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.

Generated schema:


Steps To define a derivation by extension:

  1. Open the property sheet of an element or complex type and select Extension in the Derivation list.

    The Content field (and, in the case of an element, the Embedded type field) is set to Complex.
  2. Click the Properties tool to the right of the Derivation box to open the property sheet of the extension:
  3. Specify an ID, select a base type, and then click OK to return to the element or complex type.

Extension property sheet General tab

The General tab contains the following properties:

Property Description
ID ID of the extension. Its value must be of type ID and unique within the model containing the extension
Base Type Data type on which the extension is based

 


Copyright (C) 2007. Sybase Inc. All rights reserved.