xsd.TypeAlternative¶
xsd.TypeAlternative components provide associations between boolean conditions (as xsd.XPathExpression objects) and xsd.TypeDefinition objects.
They are used in conditional type assignment to select the governing type definition of an xml.ElementInformationItem
by evaluating the test xsd.XPathExpression of the xsd.TypeAlternative schema components of a xsd.TypeTable in order.
Base class: xsd.Component
-
class
xsd.TypeAlternative¶ Proper instances of this class will be created within RaptorXML only, instantiation from script code will throw a
NotImplementedErrorexception.
Attributes¶
-
xsd.TypeAlternative.annotations¶ Returns an iterator of
xsd.Annotationcomponents.
-
xsd.Component.element Returns the
xml.ElementInformationItemrepresenting this schema component.
-
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.TypeAlternative.test¶ Returns an
xsd.XPathExpressionproperty record.
-
xsd.TypeAlternative.type_definition¶ Returns the type definition (
xsd.SimpleTypeDefinitionorxsd.ComplexTypeDefinition) associated with the test condition of thisxsd.TypeAlternative.
Special methods¶
__bool__, __eq__, __ge__, __gt__, __le__, __lt__, __ne__