xsdata.models.elements module

xsdata.models.elements.attribute(default=None, init=True, **kwargs)[source]
xsdata.models.elements.element(init=True, **kwargs)[source]
xsdata.models.elements.array_element(init=True, **kwargs)[source]
xsdata.models.elements.array_any_element(init=True, **kwargs)[source]
class xsdata.models.elements.XmlString(elements=<factory>)[source]

Bases: object

elements: Array[object] = None
render()[source]
class xsdata.models.elements.Documentation(index=<factory>, id=None, nsmap=<factory>, lang=None, source=None, elements=<factory>, attributes=None)[source]

Bases: xsdata.models.mixins.ElementBase

<documentation

source = anyURI xml:lang = language {any attributes with non-schema namespace …}> Content: ({any})*

</documentation>

class Meta[source]

Bases: object

mixed = True
lang: Optional[str] = None
source: Optional[str] = None
elements: Array[object] = None
attributes: Optional[AnyAttribute] = None
tostring()[source]
Return type

Optional[str]

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

Bases: xsdata.models.mixins.ElementBase

<appinfo

source = anyURI {any attributes with non-schema namespace …}> Content: ({any})*

</appinfo>

class Meta[source]

Bases: object

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

Bases: xsdata.models.mixins.ElementBase

<annotation

id = ID {any attributes with non-schema namespace …}> Content: (appinfo | documentation)*

</annotation>

appinfo: Optional[xsdata.models.elements.Appinfo] = None
documentations: Array[Documentation] = None
any_attribute: Optional[AnyAttribute] = None
class xsdata.models.elements.AnnotationBase(index=<factory>, id=None, nsmap=<factory>, annotation=None, any_attribute=None)[source]

Bases: xsdata.models.mixins.ElementBase

Base Class for elements that can contain annotations.

annotation: Optional[xsdata.models.elements.Annotation] = None
any_attribute: Optional[AnyAttribute] = None
property display_help
Return type

Optional[str]

class xsdata.models.elements.AnyAttribute(index=<factory>, id=None, nsmap=<factory>, annotation=None, any_attribute=None, namespace='##any', process_contents=None)[source]

Bases: xsdata.models.elements.AnnotationBase

<anyAttribute

id = ID namespace = ((##any | ##other) | List of (anyURI | (##targetNamespace | ##local))) notNamespace = List of (anyURI | (##targetNamespace | ##local)) notQName = List of (QName | ##defined) processContents = (lax | skip | strict) : strict {any attributes with non-schema namespace …}> Content: (annotation?)

</anyAttribute>

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

bool

property is_wildcard
Return type

bool

property raw_namespace
Return type

Optional[str]

property real_name
Return type

str

property real_type
Return type

Optional[str]

class xsdata.models.elements.Assertion(index=<factory>, id=None, nsmap=<factory>, annotation=None, any_attribute=None, test=None)[source]

Bases: xsdata.models.elements.AnnotationBase

<assertion

id = ID test = an XPath expression xpathDefaultNamespace =

(anyURI | (##defaultNamespace | ##targetNamespace | ##local))

{any attributes with non-schema namespace …}> Content: (annotation?)

</assertion>

test: Optional[str] = None
class xsdata.models.elements.SimpleType(index=<factory>, id=None, nsmap=<factory>, annotation=None, any_attribute=None, name=None, restriction=None, list=None, union=None)[source]

Bases: xsdata.models.elements.AnnotationBase

<simpleType

final = (#all | List of (list | union | restriction | extension)) id = ID name = NCName {any attributes with non-schema namespace …}> Content: (annotation?, (restriction | list | union))

</simpleType>

name: Optional[str] = None
restriction: Optional[Restriction] = None
list: Optional[List] = None
union: Optional[Union] = None
property is_enumeration
property is_attribute
Return type

bool

property real_type
Return type

Optional[str]

get_restrictions()[source]
Return type

Dict[str, Any]

class xsdata.models.elements.List(index=<factory>, id=None, nsmap=<factory>, annotation=None, any_attribute=None, simple_type=None, item_type=None)[source]

Bases: xsdata.models.elements.AnnotationBase

<list

id = ID itemType = QName {any attributes with non-schema namespace …}> Content: (annotation?, simpleType?)

</list>

simple_type: Optional[xsdata.models.elements.SimpleType] = None
item_type: Optional[str] = None
property is_attribute
Return type

bool

property real_name
Return type

str

property real_type
Return type

Optional[str]

class xsdata.models.elements.Union(index=<factory>, id=None, nsmap=<factory>, annotation=None, any_attribute=None, member_types=None, simple_types=<factory>)[source]

Bases: xsdata.models.elements.AnnotationBase

<union

id = ID memberTypes = List of QName {any attributes with non-schema namespace …}> Content: (annotation?, simpleType*)

</union>

member_types: Optional[str] = None
simple_types: Array[SimpleType] = None
property extends
Return type

Optional[str]

property is_attribute
Return type

bool

property real_type
Return type

Optional[str]

property real_name
Return type

str

get_restrictions()[source]
Return type

Dict[str, Any]

class xsdata.models.elements.Attribute(index=<factory>, id=None, nsmap=<factory>, annotation=None, 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.elements.AnnotationBase

<attribute

default = string fixed = string form = (qualified | unqualified) id = ID name = NCName ref = QName targetNamespace = anyURI type = QName use = (optional | prohibited | required) : optional inheritable = boolean {any attributes with non-schema namespace …}> Content: (annotation?, simpleType?)

</attribute>

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.elements.SimpleType] = None
use: Optional[xsdata.models.enums.UseType] = 'optional'
property is_attribute
Return type

bool

property real_type
Return type

Optional[str]

get_restrictions()[source]
Return type

Dict[str, Any]

class xsdata.models.elements.AttributeGroup(index=<factory>, id=None, nsmap=<factory>, annotation=None, any_attribute=None, name=None, ref=None, attributes=<factory>, attribute_groups=<factory>)[source]

Bases: xsdata.models.elements.AnnotationBase

<attributeGroup

id = ID ref = QName {any attributes with non-schema namespace …}> Content: (annotation?)

</attributeGroup>

name: Optional[str] = None
ref: Optional[str] = None
attributes: Array[Attribute] = None
attribute_groups: Array['AttributeGroup'] = None
property is_attribute
Return type

bool

property real_type
Return type

Optional[str]

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

Bases: xsdata.models.elements.AnnotationBase

<any

id = ID maxOccurs = (nonNegativeInteger | unbounded) : 1 minOccurs = nonNegativeInteger : 1 namespace = ((##any | ##other) | List of (anyURI | (##targetNamespace | ##local))) notNamespace = List of (anyURI | (##targetNamespace | ##local)) notQName = List of (QName | (##defined | ##definedSibling)) processContents = (lax | skip | strict) : strict {any attributes with non-schema namespace …}> Content: (annotation?)

</any>

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

bool

property is_wildcard
Return type

bool

property real_name
Return type

str

property raw_namespace
Return type

Optional[str]

property real_type
Return type

Optional[str]

get_restrictions()[source]
Return type

Dict[str, Any]

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

Bases: xsdata.models.elements.AnnotationBase

<all

id = ID maxOccurs = (0 | 1) : 1 minOccurs = (0 | 1) : 1 {any attributes with non-schema namespace …}> Content: (annotation?, (element | any | group)*)

</all>

min_occurs: int = 1
max_occurs: int = 1
any: Array[Any] = None
elements: Array['Element'] = None
groups: Array['Group'] = None
get_restrictions()[source]
Return type

Dict[str, Any]

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

Bases: xsdata.models.elements.AnnotationBase

<sequence

id = ID maxOccurs = (nonNegativeInteger | unbounded) : 1 minOccurs = nonNegativeInteger : 1 {any attributes with non-schema namespace …}> Content: (annotation?, (element | group | choice | sequence | any)*)

</sequence>

min_occurs: int = 1
max_occurs: int = 1
elements: Array['Element'] = None
groups: Array['Group'] = None
choices: Array['Choice'] = None
sequences: Array['Sequence'] = None
any: Array['Any'] = None
get_restrictions()[source]
Return type

Dict[str, Any]

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

Bases: xsdata.models.elements.AnnotationBase

<choice

id = ID maxOccurs = (nonNegativeInteger | unbounded) : 1 minOccurs = nonNegativeInteger : 1 {any attributes with non-schema namespace …}> Content: (annotation?, (element | group | choice | sequence | any)*)

</choice>

min_occurs: int = 1
max_occurs: int = 1
elements: Array['Element'] = None
groups: Array['Group'] = None
choices: Array['Choice'] = None
sequences: Array[Sequence] = None
any: Array['Any'] = None
get_restrictions()[source]
Return type

Dict[str, Any]

class xsdata.models.elements.Group(index=<factory>, id=None, nsmap=<factory>, annotation=None, any_attribute=None, name=None, ref=None, min_occurs=1, max_occurs=1, all=None, choice=None, sequence=None)[source]

Bases: xsdata.models.elements.AnnotationBase

<group

id = ID maxOccurs = (nonNegativeInteger | unbounded) : 1 minOccurs = nonNegativeInteger : 1 name = NCName ref = QName {any attributes with non-schema namespace …}> Content: (annotation?, (all | choice | sequence)?)

</group>

name: Optional[str] = None
ref: Optional[str] = None
min_occurs: int = 1
max_occurs: int = 1
all: Optional[xsdata.models.elements.All] = None
choice: Optional[xsdata.models.elements.Choice] = None
sequence: Optional[xsdata.models.elements.Sequence] = None
property is_attribute
Return type

bool

property real_type
Return type

Optional[str]

get_restrictions()[source]
Return type

Dict[str, Any]

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

Bases: xsdata.models.elements.AnnotationBase

<openContent

id = ID mode = (none | interleave | suffix) : interleave {any attributes with non-schema namespace …}> Content: (annotation?, any?)

</openContent>

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

Bases: xsdata.models.elements.OpenContent

<defaultOpenContent

appliesToEmpty = boolean : false id = ID mode = (interleave | suffix) : interleave {any attributes with non-schema namespace …}> Content: (annotation?, any)

</defaultOpenContent>

class xsdata.models.elements.Extension(index=<factory>, id=None, nsmap=<factory>, annotation=None, 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.elements.AnnotationBase

<extension

base = QName id = ID {any attributes with non-schema namespace …}> Content: (annotation?, ((attribute | attributeGroup)*, anyAttribute?), assert*)

</extension>

base: Optional[str] = None
group: Optional[xsdata.models.elements.Group] = None
all: Optional[xsdata.models.elements.All] = None
choice: Optional[xsdata.models.elements.Choice] = None
sequence: Optional[xsdata.models.elements.Sequence] = None
any_attribute: Optional[xsdata.models.elements.AnyAttribute] = None
open_content: Optional[xsdata.models.elements.OpenContent] = None
attributes: Array[Attribute] = None
attribute_groups: Array[AttributeGroup] = None
assertions: Array[Assertion] = None
property extends
Return type

Optional[str]

class xsdata.models.elements.Enumeration(index=<factory>, id=None, nsmap=<factory>, annotation=None, any_attribute=None, value=None)[source]

Bases: xsdata.models.elements.AnnotationBase

<enumeration

id = ID value = anySimpleType {any attributes with non-schema namespace …}> Content: (annotation?)

</enumeration>

value: str = None
property is_attribute
Return type

bool

property real_type
property real_name
property default
class xsdata.models.elements.FractionDigits(index=<factory>, id=None, nsmap=<factory>, annotation=None, any_attribute=None, value=None)[source]

Bases: xsdata.models.elements.AnnotationBase

<fractionDigits

fixed = boolean : false id = ID value = nonNegativeInteger {any attributes with non-schema namespace …}> Content: (annotation?)

</fractionDigits>

value: int = None
class xsdata.models.elements.Length(index=<factory>, id=None, nsmap=<factory>, annotation=None, any_attribute=None, value=None)[source]

Bases: xsdata.models.elements.AnnotationBase

<length

fixed = boolean : false id = ID value = nonNegativeInteger {any attributes with non-schema namespace …}> Content: (annotation?)

</length>

value: int = None
class xsdata.models.elements.MaxExclusive(index=<factory>, id=None, nsmap=<factory>, annotation=None, any_attribute=None, value=None)[source]

Bases: xsdata.models.elements.AnnotationBase

<maxExclusive

fixed = boolean : false id = ID value = anySimpleType {any attributes with non-schema namespace …}> Content: (annotation?)

</maxExclusive>

value: float = None
class xsdata.models.elements.MaxInclusive(index=<factory>, id=None, nsmap=<factory>, annotation=None, any_attribute=None, value=None)[source]

Bases: xsdata.models.elements.AnnotationBase

<maxInclusive

fixed = boolean : false id = ID value = anySimpleType {any attributes with non-schema namespace …}> Content: (annotation?)

</maxInclusive>

value: float = None
class xsdata.models.elements.MaxLength(index=<factory>, id=None, nsmap=<factory>, annotation=None, any_attribute=None, value=None)[source]

Bases: xsdata.models.elements.AnnotationBase

<maxLength

fixed = boolean : false id = ID value = nonNegativeInteger {any attributes with non-schema namespace …}> Content: (annotation?)

</maxLength>

value: float = None
class xsdata.models.elements.MinExclusive(index=<factory>, id=None, nsmap=<factory>, annotation=None, any_attribute=None, value=None)[source]

Bases: xsdata.models.elements.AnnotationBase

<minExclusive

fixed = boolean : false id = ID value = anySimpleType {any attributes with non-schema namespace …}> Content: (annotation?)

</minExclusive>

value: float = None
class xsdata.models.elements.MinInclusive(index=<factory>, id=None, nsmap=<factory>, annotation=None, any_attribute=None, value=None)[source]

Bases: xsdata.models.elements.AnnotationBase

<minInclusive

fixed = boolean : false id = ID value = anySimpleType {any attributes with non-schema namespace …}> Content: (annotation?)

</minInclusive>

value: float = None
class xsdata.models.elements.MinLength(index=<factory>, id=None, nsmap=<factory>, annotation=None, any_attribute=None, value=None)[source]

Bases: xsdata.models.elements.AnnotationBase

<minLength

fixed = boolean : false id = ID value = nonNegativeInteger {any attributes with non-schema namespace …}> Content: (annotation?)

</minLength>

value: float = None
class xsdata.models.elements.Pattern(index=<factory>, id=None, nsmap=<factory>, annotation=None, any_attribute=None, value=None)[source]

Bases: xsdata.models.elements.AnnotationBase

<pattern

id = ID value = string {any attributes with non-schema namespace …}> Content: (annotation?)

</pattern>

value: str = None
class xsdata.models.elements.TotalDigits(index=<factory>, id=None, nsmap=<factory>, annotation=None, any_attribute=None, value=None)[source]

Bases: xsdata.models.elements.AnnotationBase

<totalDigits

fixed = boolean : false id = ID value = positiveInteger {any attributes with non-schema namespace …}> Content: (annotation?)

</totalDigits>

value: int = None
class xsdata.models.elements.WhiteSpace(index=<factory>, id=None, nsmap=<factory>, annotation=None, any_attribute=None, value=None)[source]

Bases: xsdata.models.elements.AnnotationBase

<whiteSpace

fixed = boolean : false id = ID value = (collapse | preserve | replace) {any attributes with non-schema namespace …}> Content: (annotation?)

</whiteSpace>

value: str = None
class xsdata.models.elements.ExplicitTimezone(index=<factory>, id=None, nsmap=<factory>, annotation=None, any_attribute=None, value=None, fixed=False)[source]

Bases: xsdata.models.elements.AnnotationBase

<explicitTimezone

fixed = boolean : false id = ID value = NCName {any attributes with non-schema namespace …}> Content: (annotation?)

</explicitTimezone>

value: str = None
fixed: bool = False
class xsdata.models.elements.Restriction(index=<factory>, id=None, nsmap=<factory>, annotation=None, 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.elements.AnnotationBase

<restriction

base = QName id = ID {any attributes with non-schema namespace …}> Content: (annotation?, (simpleType?, (

minExclusive | minInclusive | maxExclusive | maxInclusive | totalDigits | fractionDigits | length | minLength | maxLength | enumeration | whiteSpace | pattern | assertion | explicitTimezone | {any with namespace: ##other})*)

)

</restriction>

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

Optional[str]

property real_name
Return type

str

property extends
Return type

Optional[str]

get_restrictions()[source]
Return type

Dict[str, Any]

class xsdata.models.elements.SimpleContent(index=<factory>, id=None, nsmap=<factory>, annotation=None, any_attribute=None, restriction=None, extension=None)[source]

Bases: xsdata.models.elements.AnnotationBase

<simpleContent

id = ID {any attributes with non-schema namespace …}> Content: (annotation?, (restriction | extension))

</simpleContent>

restriction: Optional[xsdata.models.elements.Restriction] = None
extension: Optional[xsdata.models.elements.Extension] = None
class xsdata.models.elements.ComplexContent(index=<factory>, id=None, nsmap=<factory>, annotation=None, any_attribute=None, restriction=None, extension=None, mixed=False)[source]

Bases: xsdata.models.elements.SimpleContent

<complexContent

id = ID mixed = boolean {any attributes with non-schema namespace …}> Content: (annotation?, (restriction | extension))

</complexContent>

mixed: bool = False
class xsdata.models.elements.ComplexType(index=<factory>, id=None, nsmap=<factory>, annotation=None, 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.elements.AnnotationBase

<complexType

abstract = boolean : false block = (#all | List of (extension | restriction)) final = (#all | List of (extension | restriction)) id = ID mixed = boolean name = NCName defaultAttributesApply = boolean : true {any attributes with non-schema namespace …}> Content: (annotation?, (

simpleContent | complexContent | (openContent?, (group | all | choice | sequence)?, ((attribute | attributeGroup)*, anyAttribute?), assert*))

)

</complexType>

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

bool

class xsdata.models.elements.Field(index=<factory>, id=None, nsmap=<factory>, annotation=None, any_attribute=None, xpath=None)[source]

Bases: xsdata.models.elements.AnnotationBase

<field

id = ID xpath = a subset of XPath expression, see below xpathDefaultNamespace =

(anyURI | (##defaultNamespace | ##targetNamespace | ##local))

{any attributes with non-schema namespace …}> Content: (annotation?)

</field>

xpath: Optional[str] = None
class xsdata.models.elements.Selector(index=<factory>, id=None, nsmap=<factory>, annotation=None, any_attribute=None, xpath=None)[source]

Bases: xsdata.models.elements.Field

<selector

id = ID xpath = a subset of XPath expression, see below xpathDefaultNamespace =

(anyURI | (##defaultNamespace | ##targetNamespace | ##local))

{any attributes with non-schema namespace …}> Content: (annotation?)

</selector>

class xsdata.models.elements.Unique(index=<factory>, id=None, nsmap=<factory>, annotation=None, any_attribute=None, name=None, selector=None, fields=<factory>)[source]

Bases: xsdata.models.elements.AnnotationBase

<unique

id = ID name = NCName ref = QName {any attributes with non-schema namespace …}> Content: (annotation?, (selector, field+)?)

</unique>

name: Optional[str] = None
selector: Optional[xsdata.models.elements.Selector] = None
fields: Array[Field] = None
class xsdata.models.elements.Key(index=<factory>, id=None, nsmap=<factory>, annotation=None, any_attribute=None, name=None, selector=None, fields=<factory>)[source]

Bases: xsdata.models.elements.AnnotationBase

<key

id = ID name = NCName ref = QName {any attributes with non-schema namespace …}> Content: (annotation?, (selector, field+)?)

</key>

name: Optional[str] = None
selector: Optional[xsdata.models.elements.Selector] = None
fields: Array[Selector] = None
class xsdata.models.elements.Keyref(index=<factory>, id=None, nsmap=<factory>, annotation=None, any_attribute=None, name=None, refer=None, selector=None, fields=<factory>)[source]

Bases: xsdata.models.elements.AnnotationBase

<keyref

id = ID name = NCName ref = QName refer = QName {any attributes with non-schema namespace …}> Content: (annotation?, (selector, field+)?)

</keyref>

name: Optional[str] = None
refer: Optional[str] = None
selector: Optional[xsdata.models.elements.Selector] = None
fields: Array[Selector] = None
class xsdata.models.elements.Alternative(index=<factory>, id=None, nsmap=<factory>, annotation=None, any_attribute=None, type=None, test=None, simple_type=None, complex_type=None)[source]

Bases: xsdata.models.elements.AnnotationBase

<alternative

id = ID test = an XPath expression type = QName xpathDefaultNamespace =

(anyURI | (##defaultNamespace | ##targetNamespace | ##local))

{any attributes with non-schema namespace …}> Content: (annotation?, (simpleType | complexType)?)

</alternative>

type: Optional[str] = None
test: Optional[str] = None
simple_type: Optional[xsdata.models.elements.SimpleType] = None
complex_type: Optional[xsdata.models.elements.ComplexType] = None
class xsdata.models.elements.Element(index=<factory>, id=None, nsmap=<factory>, annotation=None, 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.elements.AnnotationBase

<element

abstract = boolean : false block = (#all | List of (extension | restriction | substitution)) default = string final = (#all | List of (extension | restriction)) fixed = string form = (qualified | unqualified) id = ID maxOccurs = (nonNegativeInteger | unbounded) : 1 minOccurs = nonNegativeInteger : 1 name = NCName nillable = boolean : false ref = QName substitutionGroup = List of QName targetNamespace = anyURI type = QName {any attributes with non-schema namespace …}> Content: (annotation?,

((simpleType | complexType)?, alternative*, (unique | key | keyref)*))

</element>

name: Optional[str] = None
id: 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.elements.SimpleType] = None
complex_type: Optional[xsdata.models.elements.ComplexType] = None
alternatives: Array[Alternative] = None
uniques: Array[Unique] = None
keys: Array[Key] = None
keyrefs: Array[Keyref] = None
min_occurs: int = 1
max_occurs: int = 1
nillable: bool = False
abstract: bool = False
property is_attribute
Return type

bool

property is_mixed
Return type

bool

property raw_type
Return type

Optional[str]

property real_type
Return type

Optional[str]

property substitutions
Return type

List[str]

get_restrictions()[source]
Return type

Dict[str, Any]

class xsdata.models.elements.Notation(index=<factory>, id=None, nsmap=<factory>, annotation=None, any_attribute=None, name=None, public=None, system=None)[source]

Bases: xsdata.models.elements.AnnotationBase

<notation

id = ID name = NCName public = token system = anyURI {any attributes with non-schema namespace …}> Content: (annotation?)

</notation>

name: Optional[str] = None
public: Optional[str] = None
system: Optional[str] = None
class xsdata.models.elements.SchemaLocation(index=<factory>, id=None, nsmap=<factory>, annotation=None, any_attribute=None, location=None)[source]

Bases: xsdata.models.elements.AnnotationBase

location: Optional[pathlib.Path] = None
class xsdata.models.elements.Import(index=<factory>, id=None, nsmap=<factory>, annotation=None, any_attribute=None, location=None, namespace=None, schema_location=None)[source]

Bases: xsdata.models.elements.SchemaLocation

<import

id = ID namespace = anyURI schemaLocation = anyURI {any attributes with non-schema namespace …}> Content: (annotation?)

</import>

namespace: Optional[str] = None
schema_location: Optional[str] = None
class xsdata.models.elements.Include(index=<factory>, id=None, nsmap=<factory>, annotation=None, any_attribute=None, location=None, schema_location=None)[source]

Bases: xsdata.models.elements.SchemaLocation

<include

id = ID schemaLocation = anyURI {any attributes with non-schema namespace …}> Content: (annotation?)

</include>

schema_location: Optional[str] = None
class xsdata.models.elements.Redefine(index=<factory>, id=None, nsmap=<factory>, annotation=None, any_attribute=None, location=None, schema_location=None, simple_types=<factory>, complex_types=<factory>, groups=<factory>, attribute_groups=<factory>)[source]

Bases: xsdata.models.elements.SchemaLocation

<redefine

id = ID schemaLocation = anyURI {any attributes with non-schema namespace …}> Content: (annotation | (simpleType | complexType | group | attributeGroup))*

</redefine>

schema_location: Optional[str] = None
simple_types: Array[SimpleType] = None
complex_types: Array[ComplexType] = None
groups: Array[Group] = None
attribute_groups: Array[AttributeGroup] = None
class xsdata.models.elements.Override(index=<factory>, id=None, nsmap=<factory>, annotation=None, 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.elements.SchemaLocation

<override

id = ID schemaLocation = anyURI {any attributes with non-schema namespace …}> Content: (

annotation | (simpleType | complexType | group | attributeGroup | element | attribute | notation)

)*

</override>

schema_location: Optional[str] = None
simple_types: Array[SimpleType] = None
complex_types: Array[ComplexType] = None
groups: Array[Group] = None
attribute_groups: Array[AttributeGroup] = None
elements: Array[Element] = None
attributes: Array[Attribute] = None
notations: Array[Notation] = None
class xsdata.models.elements.Schema(index=<factory>, id=None, nsmap=<factory>, annotation=None, 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>, annotations=<factory>, simple_types=<factory>, complex_types=<factory>, groups=<factory>, attribute_groups=<factory>, elements=<factory>, attributes=<factory>, notations=<factory>)[source]

Bases: xsdata.models.elements.SchemaLocation

<schema

attributeFormDefault = (qualified | unqualified) : unqualified blockDefault = (#all | List of (extension | restriction | substitution)) : ‘’ defaultAttributes = QName xpathDefaultNamespace = (anyURI | (##defaultNamespace | ##targetNamespace | ##local)) : ##local elementFormDefault = (qualified | unqualified) : unqualified finalDefault = (#all | List of (extension | restriction | list | union)) : ‘’ id = ID targetNamespace = anyURI version = token xml:lang = language {any attributes with non-schema namespace …}> Content: (

(include | import | redefine | override | annotation)*, (defaultOpenContent, annotation*)?, ((simpleType | complexType | group | attributeGroup |

element | attribute | notation), annotation*)*)

</schema>

class Meta[source]

Bases: object

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.elements.DefaultOpenContent] = None
includes: Array[Include] = None
imports: Array[Import] = None
redefines: Array[Redefine] = None
overrides: Array[Override] = None
annotations: Array[Annotation] = None
simple_types: Array[SimpleType] = None
complex_types: Array[ComplexType] = None
groups: Array[Group] = None
attribute_groups: Array[AttributeGroup] = None
elements: Array[Element] = None
attributes: Array[Attribute] = None
notations: Array[Notation] = None
included()[source]
Return type

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

property module
Return type

str

property target_prefix