xsdata.models.mixins module¶
-
class
xsdata.models.mixins.ElementBase[source]¶ Bases:
objectBase xsd schema model.
- Parameters
index – Occurrence position inside the definition
ns_map – prefix-URI Namespace mapping
-
ns_map: Dict¶
-
property
default_type¶ Return the default type if the given element has not specific type.
- Return type
-
property
is_attribute¶ Return whether or not this element is qualified to be a class attribute.
- Return type
-
property
is_nillable¶ Return whether or not this element is accepts empty empty values.
- Return type
-
property
is_qualified¶ Return whether or not this element name needs to be referenced with the target namespace.
- Return type
-
property
is_ref¶ Return whether or not this element is a reference to another element.
- Return type
-
property
is_wildcard¶ Return whether or not this element is a wildcard element/attribute.
- Return type
-
property
raw_namespace¶ Return if present the target namespace attribute value.
-
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
-
property
real_type¶ Return the real type for this element.
- Raises
SchemaValueError – when attribute instance is missing implementation.
- Return type
-
property
token_types¶ Return a list of the token style data type names with the xml schema prefix.
-
data_type_ref(data_type)[source]¶ Return the given data type code with the xml schema namespace prefix if any.
-
xsdata.models.mixins.attribute(default=None, init=True, **kwargs)[source]¶ Shortcut method for attribute fields.