xsd.ComplexTypeDefinition

xsd.ComplexTypeDefinition objects provide for:

Base class: xsd.TypeDefinition -> xsd.Component

class xsd.ComplexTypeDefinition

Proper instances of this class will be created within RaptorXML only, instantiation from script code will throw a NotImplementedError exception.

Attributes

xsd.ComplexTypeDefinition.abstract

Returns True if the xsd.ComplexTypeDefinition is abstract, False otherwise. xsd.ComplexTypeDefinition objects for which abstract is true have no valid instances and thus cannot be used in the normal way as the type definition for the validation of xml.ElementInformationItem objects (if for some reason an abstract type is identified as the governing type definition of an xml.ElementInformationItem, the item will invariably be invalid). It follows that such abstract types must not be referenced from an xsi:type attribute in an instance document. Abstract xsd.ComplexTypeDefinition objects can be used as base type definitions, or even as the declared type definitions of xsd.ElementDeclaration objects, provided in every case a concrete derived type definition is used for validation, either via xsi:type or the operation of a substitution group.

xsd.ComplexTypeDefinition.annotations

Returns an iterator of xsd.Annotation components.

xsd.ComplexTypeDefinition.assertions

Returns an iterator of xsd.Assertion schema components. The assertions property constrain elements and attributes to exist, not to exist, or to have specified values. Though specified as a sequence, the order among the Assertions is not significant during assessment.

xsd.ComplexTypeDefinition.attribute_uses

Returns an iterator of xsd.AttributeUse schema components. The attribute_uses and attribute_wildcard properties specifiy which xml.AttributeInformationItem objects are permitted on xml.ElementInformationItem objects validated by this xsd.ComplexTypeDefinition.

xsd.ComplexTypeDefinition.attribute_wildcard

Returns an xsd.AnyAttribute schema component, or None if no attribute wildcard is specified for this xsd.ComplexTypeDefinition. Attribute wildcards provide a more flexible specification for validation of attributes not explicitly included in attribute_uses.

xsd.ComplexTypeDefinition.base_type_definition

Returns the base type definition of this xsd.ComplexTypeDefinition. Each xsd.ComplexTypeDefinition is derived from a base type definition which is itself either a xsd.SimpleTypeDefinition or a xsd.ComplexTypeDefinition.

xsd.ComplexTypeDefinition.content_type

Returns the xsd.ContentType property record for this xsd.ComplexTypeDefinition.

The xsd.ContentType determines the validation of children of xml.ElementInformationItem objects.

or xml.ElementInformationItem children.

using its xsd.SimpleTypeDefinition.

conform to the content model supplied by its xsd.Particle.

(i.e. specifically ignoring other children such as xml.CharDataIinformationItem objects) conform to the content model supplied by its xsd.Particle.

and others conforming to the xsd.OpenContent.

xsd.ComplexTypeDefinition.context

Returns the context of this xsd.ComplexTypeDefinition. Required if name is absent, otherwise must be None. Either an xsd.ElementDeclaration or a xsd.ComplexTypeDefinition.

xsd.ComplexTypeDefinition.derivation_method

Returns the means of derivation of this xsd.ComplexTypeDefinition. This is either xsd.DerivationMethod.EXTENSION or xsd.DerivationMethod.RESTRICTION.

xsd.Component.element

Returns the xml.ElementInformationItem representing this schema component.

xsd.ComplexTypeDefinition.final

Returns a subset of {xsd.FinalValue.EXTENSION, xsd.FinalValue.RESTRICTION}. A xsd.ComplexTypeDefinition with an empty specification for final can be used as a base type definition for other types derived by either of extension or restriction; the explicit values xsd.FinalValue.EXTENSION, and xsd.FinalValue.RESTRICTION prevent further derivations by extension and restriction respectively.

xsd.Component.id

Returns the value of the ‘id’ attribute as a string, or None if the schema component’s XML element doesn’t have an ‘id’ attribute.

xsd.ComplexTypeDefinition.name

Returns the name of the xsd.ComplexTypeDefinition.

xsd.ComplexTypeDefinition.prohibited_substitutions

Returns a subset of {xsd.BlockValue.EXTENSION, xsd.BlockValue.RESTRICTION}. The xsd.ComplexTypeDefinition.prohibited_substitutions property of a xsd.ComplexTypeDefinition T determines whether type definitions derived from T are or are not validly substitutable for T.

for T if its derivation from T involves any restriction steps.

T if its derivation from T involves any extension steps.

xsd.ComplexTypeDefinition.qname

Returns a xml.QName object representing the name and target_namespace pair of the component.

xsd.ComplexTypeDefinition.target_namespace

Returns the target namespace of the xsd.ComplexTypeDefinition.

Methods

xsd.TypeDefinition.is_derived_from(TypeDefinition typeDef)

Returns True if this xsd.TypeDefinition is derived from other, False otherwise.

Special methods

__bool__, __eq__, __ge__, __gt__, __le__, __lt__, __ne__