Programmer's Guide > Interfaces > W3C TypeInfo interface > DerivationMethods enumeration
  
DerivationMethods enumeration
These are the available values for the derivationMethod parameter used by the method TypeInfo.isDerivedFrom(). It is a set of possible types of derivation, and the values represent bit positions. If a bit in the derivationMethod parameter is set to 1, the corresponding type of derivation will be taken into account when evaluating the derivation between the reference type definition and the other type definition. When using the isDerivedFrom method, combining all of them in the derivationMethod parameter is equivalent to invoking the method for each of them separately and combining the results with the OR boolean function. This specification only defines the type of derivation for XML Schema.
In addition to the types of derivation listed below, please note that:
any type derives from xsd:anyType.
any simple type derives from xsd:anySimpleType by restriction.
any complex type does not derive from xsd:anySimpleType by restriction.
The DerivationMethods enumeration has the following constants of type unsigned short.
DERIVATION_EXTENSION = 1
If the document's schema is an XML Schema [XML Schema Part 1], this constant represents the derivation by extension.
The reference type definition is derived by extension from the other type definition if the other type definition can be reached recursively following the {base type definition} property from the reference type definition, and at least one of the derivation methods involved is an extension.
DERIVATION_LIST = 2
If the document's schema is an XML Schema [XML Schema Part 1], this constant represents the list.
The reference type definition is derived by list from the other type definition if there exists two type definitions T1 and T2 such as the reference type definition is derived from T1 by DERIVATION_RESTRICTION or DERIVATION_EXTENSION, T2 is derived from the other type definition by DERIVATION_RESTRICTION, T1 has {variety} list, and T2 is the {item type definition}. Note that T1 could be the same as the reference type definition, and T2 could be the same as the other type definition.
DERIVATION_RESTRICTION = 3
If the document's schema is an XML Schema [XML Schema Part 1], this constant represents the derivation by restriction if complex types are involved, or a restriction if simple types are involved.
The reference type definition is derived by restriction from the other type definition if the other type definition is the same as the reference type definition, or if the other type definition can be reached recursively following the {base type definition} property from the reference type definition, and all the derivation methods involved are restriction.
DERIVATION_UNION = 4
If the document's schema is an XML Schema [XML Schema Part 1], this constant represents the union if simple types are involved.
The reference type definition is derived by union from the other type definition if there exists two type definitions T1 and T2 such as the reference type definition is derived from T1 by DERIVATION_RESTRICTION or DERIVATION_EXTENSION, T2 is derived from the other type definition by DERIVATION_RESTRICTION, T1 has {variety} union, and one of the {member type definitions} is T2. Note that T1 could be the same as the reference type definition, and T2 could be the same as the other type definition.