xsdata.models.xsd module

class xsdata.models.xsd.Docstring(elements=<factory>)[source]

Bases: object

Parameters

elements (List[object]) –

elements: List[object]
class xsdata.models.xsd.Documentation(lang=None, source=None, elements=<factory>, attributes=None)[source]

Bases: xsdata.models.mixins.ElementBase

Model representation of a schema xs:documentation element.

Parameters
lang: Optional[str] = None
source: Optional[str] = None
elements: List[object]
attributes: Optional[xsdata.models.xsd.AnyAttribute] = None
tostring()[source]
Return type

Optional[str]

class xsdata.models.xsd.Appinfo(source=None, elements=<factory>, any_attribute=None)[source]

Bases: xsdata.models.mixins.ElementBase

Model representation of a schema xs:appinfo element.

Parameters
class Meta[source]

Bases: object

mixed = True
source: Optional[str] = None
elements: List[object]
any_attribute: Optional[xsdata.models.xsd.AnyAttribute] = None
class xsdata.models.xsd.Annotation(appinfo=None, documentations=<factory>, any_attribute=None)[source]

Bases: xsdata.models.mixins.ElementBase

Model representation of a schema xs:annotation element.

Parameters
appinfo: Optional[xsdata.models.xsd.Appinfo] = None
documentations: List[xsdata.models.xsd.Documentation]
any_attribute: Optional[xsdata.models.xsd.AnyAttribute] = None
class xsdata.models.xsd.AnnotationBase(id=None, annotations=<factory>, any_attribute=None)[source]

Bases: xsdata.models.mixins.ElementBase

Base Class for elements that can contain annotations.

Parameters
id: Optional[str] = None
annotations: List[xsdata.models.xsd.Annotation]
any_attribute: Optional[xsdata.models.xsd.AnyAttribute] = None
property display_help

Return the display help for this element.

Return type

Optional[str]

class xsdata.models.xsd.AnyAttribute(id=None, annotations=<factory>, any_attribute=None, namespace='##any', process_contents=None)[source]

Bases: xsdata.models.xsd.AnnotationBase

Model representation of a schema xs:anyAttribute element.

Parameters
namespace: str = '##any'
process_contents: Optional[xsdata.models.enums.ProcessType] = None
property is_attribute

Return whether or not this element is qualified to be a class attribute.

Return type

bool

property raw_namespace

Return if present the target namespace attribute value.

Return type

Optional[str]

property real_name

Return the real name for this element by looking by looking either to the name or ref attribute value.

Raises

SchemaValueError – when instance has no name/ref attribute.

Return type

str

property real_type

Return the real type for this element.

Raises

SchemaValueError – when attribute instance is missing implementation.

Return type

str

class xsdata.models.xsd.Assertion(id=None, annotations=<factory>, any_attribute=None, test=None)[source]

Bases: xsdata.models.xsd.AnnotationBase

Model representation of a schema xs:assertion element.

Parameters
test: Optional[str] = None
class xsdata.models.xsd.SimpleType(id=None, annotations=<factory>, any_attribute=None, name=None, restriction=None, list=None, union=None)[source]

Bases: xsdata.models.xsd.AnnotationBase

Model representation of a schema xs:simpleType element.

Parameters
name: Optional[str] = None
restriction: Optional[xsdata.models.xsd.Restriction] = None
list: Optional[xsdata.models.xsd.List] = None
union: Optional[xsdata.models.xsd.Union] = None
property is_attribute

Return whether or not this element is qualified to be a class attribute.

Return type

bool

property is_enumeration
Return type

bool

property real_name

Return the real name for this element by looking by looking either to the name or ref attribute value.

Raises

SchemaValueError – when instance has no name/ref attribute.

Return type

str

property real_type

Return the real type for this element.

Raises

SchemaValueError – when attribute instance is missing implementation.

Return type

str

get_restrictions()[source]

Return the restrictions dictionary of this element.

Return type

Dict[str, Any]

class xsdata.models.xsd.List(id=None, annotations=<factory>, any_attribute=None, simple_type=None, item_type='')[source]

Bases: xsdata.models.xsd.AnnotationBase

Model representation of a schema xs:list element.

Parameters
simple_type: Optional[xsdata.models.xsd.SimpleType] = None
item_type: str = ''
property is_attribute

Return whether or not this element is qualified to be a class attribute.

Return type

bool

property real_name

Return the real name for this element by looking by looking either to the name or ref attribute value.

Raises

SchemaValueError – when instance has no name/ref attribute.

Return type

str

property real_type

Return the real type for this element.

Raises

SchemaValueError – when attribute instance is missing implementation.

Return type

str

get_restrictions()[source]

Return the restrictions dictionary of this element.

Return type

Dict[str, Any]

class xsdata.models.xsd.Union(id=None, annotations=<factory>, any_attribute=None, member_types=None, simple_types=<factory>)[source]

Bases: xsdata.models.xsd.AnnotationBase

Model representation of a schema xs:union element.

Parameters
member_types: Optional[str] = None
simple_types: List[xsdata.models.xsd.SimpleType]
property extensions

Return an iterator of all the base types.

Return type

Iterator[str]

property is_attribute

Return whether or not this element is qualified to be a class attribute.

Return type

bool

property real_name

Return the real name for this element by looking by looking either to the name or ref attribute value.

Raises

SchemaValueError – when instance has no name/ref attribute.

Return type

str

property real_type

Return the real type for this element.

Raises

SchemaValueError – when attribute instance is missing implementation.

Return type

str

get_restrictions()[source]

Return the restrictions dictionary of this element.

Return type

Dict[str, Any]

class xsdata.models.xsd.Attribute(id=None, annotations=<factory>, any_attribute=None, default=None, fixed=None, form=None, name=None, ref=None, type=None, target_namespace=None, simple_type=None, use=<UseType.OPTIONAL: 'optional'>)[source]

Bases: xsdata.models.xsd.AnnotationBase

Model representation of a schema xs:attribute element.

Parameters
default: Optional[str] = None
fixed: Optional[str] = None
form: Optional[xsdata.models.enums.FormType] = None
name: Optional[str] = None
ref: Optional[str] = None
type: Optional[str] = None
target_namespace: Optional[str] = None
simple_type: Optional[xsdata.models.xsd.SimpleType] = None
use: Optional[xsdata.models.enums.UseType] = 'optional'
property is_attribute

Return whether or not this element is qualified to be a class attribute.

Return type

bool

property real_type

Return the real type for this element.

Raises

SchemaValueError – when attribute instance is missing implementation.

Return type

str

get_restrictions()[source]

Return the restrictions dictionary of this element.

Return type

Dict[str, Any]

class xsdata.models.xsd.AttributeGroup(id=None, annotations=<factory>, any_attribute=None, ref='', name=None, attributes=<factory>, attribute_groups=<factory>)[source]

Bases: xsdata.models.xsd.AnnotationBase

Model representation of a schema xs:attributeGroup element.

Parameters
ref: str = ''
name: Optional[str] = None
attributes: List[xsdata.models.xsd.Attribute]
attribute_groups: List[xsdata.models.xsd.AttributeGroup]
property is_attribute

Return whether or not this element is qualified to be a class attribute.

Return type

bool

property real_type

Return the real type for this element.

Raises

SchemaValueError – when attribute instance is missing implementation.

Return type

str

class xsdata.models.xsd.Any(id=None, annotations=<factory>, any_attribute=None, namespace='##any', min_occurs=1, max_occurs=1, process_contents=None)[source]

Bases: xsdata.models.xsd.AnnotationBase

Model representation of a schema xs:any element.

Parameters
namespace: str = '##any'
min_occurs: int = 1
max_occurs: Union[int, str] = 1
process_contents: Optional[xsdata.models.enums.ProcessType] = None
property is_attribute

Return whether or not this element is qualified to be a class attribute.

Return type

bool

property real_name

Return the real name for this element by looking by looking either to the name or ref attribute value.

Raises

SchemaValueError – when instance has no name/ref attribute.

Return type

str

property raw_namespace

Return if present the target namespace attribute value.

Return type

Optional[str]

property real_type

Return the real type for this element.

Raises

SchemaValueError – when attribute instance is missing implementation.

Return type

str

get_restrictions()[source]

Return the restrictions dictionary of this element.

Return type

Dict[str, Any]

class xsdata.models.xsd.All(id=None, annotations=<factory>, any_attribute=None, min_occurs=1, max_occurs=1, any=<factory>, elements=<factory>, groups=<factory>)[source]

Bases: xsdata.models.xsd.AnnotationBase

Model representation of a schema xs:all element.

Parameters
min_occurs: int = 1
max_occurs: Union[int, str] = 1
any: List[xsdata.models.xsd.Any]
elements: List[xsdata.models.xsd.Element]
groups: List[xsdata.models.xsd.Group]
get_restrictions()[source]

Return the restrictions dictionary of this element.

Return type

Dict[str, Any]

class xsdata.models.xsd.Sequence(id=None, annotations=<factory>, any_attribute=None, min_occurs=1, max_occurs=1, elements=<factory>, groups=<factory>, choices=<factory>, sequences=<factory>, any=<factory>)[source]

Bases: xsdata.models.xsd.AnnotationBase

Model representation of a schema xs:sequence element.

Parameters
min_occurs: int = 1
max_occurs: Union[int, str] = 1
elements: List[xsdata.models.xsd.Element]
groups: List[xsdata.models.xsd.Group]
choices: List[xsdata.models.xsd.Choice]
sequences: List[xsdata.models.xsd.Sequence]
any: List[xsdata.models.xsd.Any]
get_restrictions()[source]

Return the restrictions dictionary of this element.

Return type

Dict[str, Any]

class xsdata.models.xsd.Choice(id=None, annotations=<factory>, any_attribute=None, min_occurs=1, max_occurs=1, elements=<factory>, groups=<factory>, choices=<factory>, sequences=<factory>, any=<factory>)[source]

Bases: xsdata.models.xsd.AnnotationBase

Model representation of a schema xs:choice element.

Parameters
min_occurs: int = 1
max_occurs: Union[int, str] = 1
elements: List[xsdata.models.xsd.Element]
groups: List[xsdata.models.xsd.Group]
choices: List[xsdata.models.xsd.Choice]
sequences: List[xsdata.models.xsd.Sequence]
any: List[xsdata.models.xsd.Any]
get_restrictions()[source]

Return the restrictions dictionary of this element.

Return type

Dict[str, Any]

class xsdata.models.xsd.Group(id=None, annotations=<factory>, any_attribute=None, name=None, ref='', min_occurs=1, max_occurs=1, all=None, choice=None, sequence=None)[source]

Bases: xsdata.models.xsd.AnnotationBase

Model representation of a schema xs:group element.

Parameters
name: Optional[str] = None
ref: str = ''
min_occurs: int = 1
max_occurs: Union[int, str] = 1
all: Optional[xsdata.models.xsd.All] = None
choice: Optional[xsdata.models.xsd.Choice] = None
sequence: Optional[xsdata.models.xsd.Sequence] = None
property is_attribute

Return whether or not this element is qualified to be a class attribute.

Return type

bool

property real_type

Return the real type for this element.

Raises

SchemaValueError – when attribute instance is missing implementation.

Return type

str

get_restrictions()[source]

Return the restrictions dictionary of this element.

Return type

Dict[str, Any]

class xsdata.models.xsd.OpenContent(id=None, annotations=<factory>, any_attribute=None, applies_to_empty=False, mode=<Mode.INTERLEAVE: 'interleave'>, any=None)[source]

Bases: xsdata.models.xsd.AnnotationBase

Model representation of a schema xs:openContent element.

Parameters
applies_to_empty: bool = False
mode: xsdata.models.enums.Mode = 'interleave'
any: xsdata.models.xsd.Any = None
class xsdata.models.xsd.DefaultOpenContent(id=None, annotations=<factory>, any_attribute=None, applies_to_empty=False, mode=<Mode.INTERLEAVE: 'interleave'>, any=None)[source]

Bases: xsdata.models.xsd.OpenContent

Model representation of a schema xs:defaultOpenContent element.

Parameters
class xsdata.models.xsd.Extension(id=None, annotations=<factory>, any_attribute=None, base=None, group=None, all=None, choice=None, sequence=None, open_content=None, attributes=<factory>, attribute_groups=<factory>, assertions=<factory>)[source]

Bases: xsdata.models.xsd.AnnotationBase

Model representation of a schema xs:extension element.

Parameters
base: Optional[str] = None
group: Optional[xsdata.models.xsd.Group] = None
all: Optional[xsdata.models.xsd.All] = None
choice: Optional[xsdata.models.xsd.Choice] = None
sequence: Optional[xsdata.models.xsd.Sequence] = None
any_attribute: Optional[xsdata.models.xsd.AnyAttribute] = None
open_content: Optional[xsdata.models.xsd.OpenContent] = None
attributes: List[xsdata.models.xsd.Attribute]
attribute_groups: List[xsdata.models.xsd.AttributeGroup]
assertions: List[xsdata.models.xsd.Assertion]
property extensions

Return an iterator of all the base types.

Return type

Iterator[str]

class xsdata.models.xsd.Enumeration(id=None, annotations=<factory>, any_attribute=None, value=None)[source]

Bases: xsdata.models.xsd.AnnotationBase

Model representation of a schema xs:enumeration element.

Parameters
value: str = None
property is_attribute

Return whether or not this element is qualified to be a class attribute.

Return type

bool

property real_type

Return the real type for this element.

Raises

SchemaValueError – when attribute instance is missing implementation.

Return type

str

property real_name

Return the real name for this element by looking by looking either to the name or ref attribute value.

Raises

SchemaValueError – when instance has no name/ref attribute.

Return type

str

property default
Return type

str

class xsdata.models.xsd.FractionDigits(id=None, annotations=<factory>, any_attribute=None, value=None)[source]

Bases: xsdata.models.xsd.AnnotationBase

Model representation of a schema xs:fractionDigits element.

Parameters
value: int = None
class xsdata.models.xsd.Length(id=None, annotations=<factory>, any_attribute=None, value=None)[source]

Bases: xsdata.models.xsd.AnnotationBase

Model representation of a schema xs:length element.

Parameters
value: int = None
class xsdata.models.xsd.MaxExclusive(id=None, annotations=<factory>, any_attribute=None, value=None)[source]

Bases: xsdata.models.xsd.AnnotationBase

Model representation of a schema xs:maxExclusive element.

Parameters
value: str = None
class xsdata.models.xsd.MaxInclusive(id=None, annotations=<factory>, any_attribute=None, value=None)[source]

Bases: xsdata.models.xsd.AnnotationBase

Model representation of a schema xs:maxInclusive element.

Parameters
value: str = None
class xsdata.models.xsd.MaxLength(id=None, annotations=<factory>, any_attribute=None, value=None)[source]

Bases: xsdata.models.xsd.AnnotationBase

Model representation of a schema xs:maxLength element.

Parameters
value: int = None
class xsdata.models.xsd.MinExclusive(id=None, annotations=<factory>, any_attribute=None, value=None)[source]

Bases: xsdata.models.xsd.AnnotationBase

Model representation of a schema xs:minExclusive element.

Parameters
value: str = None
class xsdata.models.xsd.MinInclusive(id=None, annotations=<factory>, any_attribute=None, value=None)[source]

Bases: xsdata.models.xsd.AnnotationBase

Model representation of a schema xs:minInclusive element.

Parameters
value: str = None
class xsdata.models.xsd.MinLength(id=None, annotations=<factory>, any_attribute=None, value=None)[source]

Bases: xsdata.models.xsd.AnnotationBase

Model representation of a schema xs:minLength element.

Parameters
value: int = None
class xsdata.models.xsd.Pattern(id=None, annotations=<factory>, any_attribute=None, value=None)[source]

Bases: xsdata.models.xsd.AnnotationBase

Model representation of a schema xs:pattern element.

Parameters
value: str = None
class xsdata.models.xsd.TotalDigits(id=None, annotations=<factory>, any_attribute=None, value=None)[source]

Bases: xsdata.models.xsd.AnnotationBase

Model representation of a schema xs:totalDigits element.

Parameters
value: int = None
class xsdata.models.xsd.WhiteSpace(id=None, annotations=<factory>, any_attribute=None, value=None)[source]

Bases: xsdata.models.xsd.AnnotationBase

Model representation of a schema xs:whiteSpace element.

Parameters
value: str = None
class xsdata.models.xsd.ExplicitTimezone(id=None, annotations=<factory>, any_attribute=None, value=None, fixed=False)[source]

Bases: xsdata.models.xsd.AnnotationBase

Model representation of a schema xs:explicitTimezone element.

Parameters
value: str = None
fixed: bool = False
class xsdata.models.xsd.Restriction(id=None, annotations=<factory>, any_attribute=None, base=None, group=None, all=None, choice=None, sequence=None, open_content=None, attributes=<factory>, attribute_groups=<factory>, enumerations=<factory>, asserts=<factory>, assertions=<factory>, any_element=<factory>, min_exclusive=None, min_inclusive=None, min_length=None, max_exclusive=None, max_inclusive=None, max_length=None, total_digits=None, fraction_digits=None, length=None, white_space=None, patterns=<factory>, explicit_timezone=None, simple_type=None)[source]

Bases: xsdata.models.xsd.AnnotationBase

Model representation of a schema xs:restriction element.

Parameters
base: Optional[str] = None
group: Optional[xsdata.models.xsd.Group] = None
all: Optional[xsdata.models.xsd.All] = None
choice: Optional[xsdata.models.xsd.Choice] = None
sequence: Optional[xsdata.models.xsd.Sequence] = None
open_content: Optional[xsdata.models.xsd.OpenContent] = None
attributes: List[xsdata.models.xsd.Attribute]
attribute_groups: List[xsdata.models.xsd.AttributeGroup]
enumerations: List[xsdata.models.xsd.Enumeration]
asserts: List[xsdata.models.xsd.Assertion]
assertions: List[xsdata.models.xsd.Assertion]
any_element: List[object]
min_exclusive: Optional[xsdata.models.xsd.MinExclusive] = None
min_inclusive: Optional[xsdata.models.xsd.MinInclusive] = None
min_length: Optional[xsdata.models.xsd.MinLength] = None
max_exclusive: Optional[xsdata.models.xsd.MaxExclusive] = None
max_inclusive: Optional[xsdata.models.xsd.MaxInclusive] = None
max_length: Optional[xsdata.models.xsd.MaxLength] = None
total_digits: Optional[xsdata.models.xsd.TotalDigits] = None
fraction_digits: Optional[xsdata.models.xsd.FractionDigits] = None
length: Optional[xsdata.models.xsd.Length] = None
white_space: Optional[xsdata.models.xsd.WhiteSpace] = None
patterns: List[xsdata.models.xsd.Pattern]
explicit_timezone: Optional[xsdata.models.xsd.ExplicitTimezone] = None
simple_type: Optional[xsdata.models.xsd.SimpleType] = None
property real_type

Return the real type for this element.

Raises

SchemaValueError – when attribute instance is missing implementation.

Return type

str

property real_name

Return the real name for this element by looking by looking either to the name or ref attribute value.

Raises

SchemaValueError – when instance has no name/ref attribute.

Return type

str

property extensions

Return an iterator of all the base types.

Return type

Iterator[str]

get_restrictions()[source]

Return the restrictions dictionary of this element.

Return type

Dict[str, Any]

class xsdata.models.xsd.SimpleContent(id=None, annotations=<factory>, any_attribute=None, restriction=None, extension=None)[source]

Bases: xsdata.models.xsd.AnnotationBase

Model representation of a schema xs:simpleContent element.

Parameters
restriction: Optional[xsdata.models.xsd.Restriction] = None
extension: Optional[xsdata.models.xsd.Extension] = None
class xsdata.models.xsd.ComplexContent(id=None, annotations=<factory>, any_attribute=None, restriction=None, extension=None, mixed=False)[source]

Bases: xsdata.models.xsd.SimpleContent

Model representation of a schema xs:complexContent element.

Parameters
mixed: bool = False
class xsdata.models.xsd.ComplexType(id=None, annotations=<factory>, any_attribute=None, name=None, block=None, final=None, simple_content=None, complex_content=None, group=None, all=None, choice=None, sequence=None, open_content=None, attributes=<factory>, attribute_groups=<factory>, assertion=<factory>, abstract=False, mixed=False, default_attributes_apply=True)[source]

Bases: xsdata.models.xsd.AnnotationBase

Model representation of a schema xs:complexType element.

Parameters
name: Optional[str] = None
block: Optional[str] = None
final: Optional[str] = None
simple_content: Optional[xsdata.models.xsd.SimpleContent] = None
complex_content: Optional[xsdata.models.xsd.ComplexContent] = None
group: Optional[xsdata.models.xsd.Group] = None
all: Optional[xsdata.models.xsd.All] = None
choice: Optional[xsdata.models.xsd.Choice] = None
sequence: Optional[xsdata.models.xsd.Sequence] = None
any_attribute: Optional[xsdata.models.xsd.AnyAttribute] = None
open_content: Optional[xsdata.models.xsd.OpenContent] = None
attributes: List[xsdata.models.xsd.Attribute]
attribute_groups: List[xsdata.models.xsd.AttributeGroup]
assertion: List[xsdata.models.xsd.Assertion]
abstract: bool = False
mixed: bool = False
default_attributes_apply: bool = True
property is_mixed

Return whether or not this element accepts mixed content value.

Return type

bool

class xsdata.models.xsd.Field(id=None, annotations=<factory>, any_attribute=None, xpath=None)[source]

Bases: xsdata.models.xsd.AnnotationBase

Model representation of a schema xs:field element.

Parameters
xpath: Optional[str] = None
class xsdata.models.xsd.Selector(id=None, annotations=<factory>, any_attribute=None, xpath=None)[source]

Bases: xsdata.models.xsd.Field

Schema Model representation of a schema xs:selectorModel element..

Parameters
class xsdata.models.xsd.Unique(id=None, annotations=<factory>, any_attribute=None, name=None, ref=None, selector=None, fields=<factory>)[source]

Bases: xsdata.models.xsd.AnnotationBase

Model representation of a schema xs:unique element.

Parameters
name: Optional[str] = None
ref: Optional[str] = None
selector: Optional[xsdata.models.xsd.Selector] = None
fields: List[xsdata.models.xsd.Field]
class xsdata.models.xsd.Key(id=None, annotations=<factory>, any_attribute=None, name=None, ref=None, selector=None, fields=<factory>)[source]

Bases: xsdata.models.xsd.AnnotationBase

Model representation of a schema xs:key element.

Parameters
name: Optional[str] = None
ref: Optional[str] = None
selector: Optional[xsdata.models.xsd.Selector] = None
fields: List[xsdata.models.xsd.Selector]
class xsdata.models.xsd.Keyref(id=None, annotations=<factory>, any_attribute=None, name=None, ref=None, refer=None, selector=None, fields=<factory>)[source]

Bases: xsdata.models.xsd.AnnotationBase

Model representation of a schema xs:keyref element.

Parameters
name: Optional[str] = None
ref: Optional[str] = None
refer: Optional[str] = None
selector: Optional[xsdata.models.xsd.Selector] = None
fields: List[xsdata.models.xsd.Selector]
class xsdata.models.xsd.Alternative(id=None, annotations=<factory>, any_attribute=None, type=None, test=None, simple_type=None, complex_type=None)[source]

Bases: xsdata.models.xsd.AnnotationBase

Model representation of a schema xs:alternative element.

Parameters
type: Optional[str] = None
test: Optional[str] = None
simple_type: Optional[xsdata.models.xsd.SimpleType] = None
complex_type: Optional[xsdata.models.xsd.ComplexType] = None
property real_name

Return the real name for this element by looking by looking either to the name or ref attribute value.

Raises

SchemaValueError – when instance has no name/ref attribute.

Return type

str

class xsdata.models.xsd.Element(id=None, annotations=<factory>, any_attribute=None, name=None, ref=None, type=None, substitution_group=None, default=None, fixed=None, form=None, block=None, final=None, target_namespace=None, simple_type=None, complex_type=None, alternatives=<factory>, uniques=<factory>, keys=<factory>, keyrefs=<factory>, min_occurs=1, max_occurs=1, nillable=False, abstract=False)[source]

Bases: xsdata.models.xsd.AnnotationBase

Model representation of a schema xs:element element.

Parameters
name: Optional[str] = None
ref: Optional[str] = None
type: Optional[str] = None
substitution_group: Optional[str] = None
default: Optional[str] = None
fixed: Optional[str] = None
form: Optional[xsdata.models.enums.FormType] = None
block: Optional[str] = None
final: Optional[str] = None
target_namespace: Optional[str] = None
simple_type: Optional[xsdata.models.xsd.SimpleType] = None
complex_type: Optional[xsdata.models.xsd.ComplexType] = None
alternatives: List[xsdata.models.xsd.Alternative]
uniques: List[xsdata.models.xsd.Unique]
keys: List[xsdata.models.xsd.Key]
keyrefs: List[xsdata.models.xsd.Keyref]
min_occurs: int = 1
max_occurs: Union[int, str] = 1
nillable: bool = False
abstract: bool = False
property is_attribute

Return whether or not this element is qualified to be a class attribute.

Return type

bool

property is_mixed

Return whether or not this element accepts mixed content value.

Return type

bool

property default_type

Return the default type if the given element has not specific type.

Return type

str

property raw_type

Return if present the type attribute value.

Return type

Optional[str]

property real_type

Return the real type for this element.

Raises

SchemaValueError – when attribute instance is missing implementation.

Return type

str

property substitutions

Return the substitution groups of this element.

Return type

List[str]

get_restrictions()[source]

Return the restrictions dictionary of this element.

Return type

Dict[str, Any]

class xsdata.models.xsd.Notation(id=None, annotations=<factory>, any_attribute=None, name=None, public=None, system=None)[source]

Bases: xsdata.models.xsd.AnnotationBase

Model representation of a schema xs:notation element.

Parameters
name: Optional[str] = None
public: Optional[str] = None
system: Optional[str] = None
class xsdata.models.xsd.SchemaLocation(id=None, annotations=<factory>, any_attribute=None, location=None)[source]

Bases: xsdata.models.xsd.AnnotationBase

Model representation of a schema xs:schemaLocation element. Base schema location.

Parameters
location: Optional[str] = None
class xsdata.models.xsd.Import(id=None, annotations=<factory>, any_attribute=None, location=None, namespace=None, schema_location=None)[source]

Bases: xsdata.models.xsd.SchemaLocation

Model representation of a schema xs:import element.

Parameters
namespace: Optional[str] = None
schema_location: Optional[str] = None
class xsdata.models.xsd.Include(id=None, annotations=<factory>, any_attribute=None, location=None, schema_location=None)[source]

Bases: xsdata.models.xsd.SchemaLocation

Model representation of a schema xs:include element.

Parameters
schema_location: Optional[str] = None
class xsdata.models.xsd.Redefine(id=None, annotations=<factory>, any_attribute=None, location=None, schema_location=None, simple_types=<factory>, complex_types=<factory>, groups=<factory>, attribute_groups=<factory>)[source]

Bases: xsdata.models.xsd.SchemaLocation

Model representation of a schema xs:redefine element.

Parameters
schema_location: Optional[str] = None
simple_types: List[xsdata.models.xsd.SimpleType]
complex_types: List[xsdata.models.xsd.ComplexType]
groups: List[xsdata.models.xsd.Group]
attribute_groups: List[xsdata.models.xsd.AttributeGroup]
class xsdata.models.xsd.Override(id=None, annotations=<factory>, any_attribute=None, location=None, schema_location=None, simple_types=<factory>, complex_types=<factory>, groups=<factory>, attribute_groups=<factory>, elements=<factory>, attributes=<factory>, notations=<factory>)[source]

Bases: xsdata.models.xsd.SchemaLocation

Model representation of a schema xs:override element.

Parameters
schema_location: Optional[str] = None
simple_types: List[xsdata.models.xsd.SimpleType]
complex_types: List[xsdata.models.xsd.ComplexType]
groups: List[xsdata.models.xsd.Group]
attribute_groups: List[xsdata.models.xsd.AttributeGroup]
elements: List[xsdata.models.xsd.Element]
attributes: List[xsdata.models.xsd.Attribute]
notations: List[xsdata.models.xsd.Notation]
class xsdata.models.xsd.Schema(id=None, annotations=<factory>, any_attribute=None, location=None, target=None, block_default=None, default_attributes=None, final_default=None, target_namespace=None, version=None, xmlns=None, element_form_default=<FormType.UNQUALIFIED: 'unqualified'>, attribute_form_default=<FormType.UNQUALIFIED: 'unqualified'>, default_open_content=None, includes=<factory>, imports=<factory>, redefines=<factory>, overrides=<factory>, simple_types=<factory>, complex_types=<factory>, groups=<factory>, attribute_groups=<factory>, elements=<factory>, attributes=<factory>, notations=<factory>)[source]

Bases: xsdata.models.xsd.SchemaLocation, xsdata.models.mixins.ModuleMixin

Model representation of a schema xs:schema element.

Parameters
class Meta[source]

Bases: object

name = 'schema'
namespace = 'http://www.w3.org/2001/XMLSchema'
target: Optional[str] = None
block_default: Optional[str] = None
default_attributes: Optional[str] = None
final_default: Optional[str] = None
target_namespace: Optional[str] = None
version: Optional[str] = None
xmlns: Optional[str] = None
element_form_default: xsdata.models.enums.FormType = 'unqualified'
attribute_form_default: xsdata.models.enums.FormType = 'unqualified'
default_open_content: Optional[xsdata.models.xsd.DefaultOpenContent] = None
includes: List[xsdata.models.xsd.Include]
imports: List[xsdata.models.xsd.Import]
redefines: List[xsdata.models.xsd.Redefine]
overrides: List[xsdata.models.xsd.Override]
annotations: List[xsdata.models.xsd.Annotation]
simple_types: List[xsdata.models.xsd.SimpleType]
complex_types: List[xsdata.models.xsd.ComplexType]
groups: List[xsdata.models.xsd.Group]
attribute_groups: List[xsdata.models.xsd.AttributeGroup]
elements: List[xsdata.models.xsd.Element]
attributes: List[xsdata.models.xsd.Attribute]
notations: List[xsdata.models.xsd.Notation]
included()[source]
Return type

Iterator[Union[Import, Include, Redefine, Override]]