pub struct ComplexTypeDef {Show 16 fields
pub name: Option<NameId>,
pub target_namespace: Option<NameId>,
pub source: Option<SourceRef>,
pub base_type: Option<TypeRef>,
pub derivation_method: Option<DerivationMethod>,
pub content: ComplexTypeContent,
pub content_kind: ContentKind,
pub attributes: Vec<AttributeUse>,
pub attribute_groups: Vec<AttributeGroupKey>,
pub attribute_wildcard: Option<AttributeWildcard>,
pub final_derivation: DerivationSet,
pub block: DerivationSet,
pub is_abstract: bool,
pub mixed: bool,
pub id: Option<String>,
pub default_attributes_apply: bool,
}Expand description
Complex type definition
Represents an XSD complex type with content model and attributes.
Fields§
§name: Option<NameId>Name (None for anonymous types)
target_namespace: Option<NameId>Target namespace
source: Option<SourceRef>Source location for error reporting
base_type: Option<TypeRef>Base type (from which this type is derived)
derivation_method: Option<DerivationMethod>Derivation method (restriction or extension)
content: ComplexTypeContentContent model
content_kind: ContentKindContent kind (for quick access)
attributes: Vec<AttributeUse>Attribute uses
attribute_groups: Vec<AttributeGroupKey>Attribute group references
attribute_wildcard: Option<AttributeWildcard>Attribute wildcard
final_derivation: DerivationSetFinal derivation control (which derivations are prohibited)
block: DerivationSetBlock derivation control (which derivations are blocked for instances)
is_abstract: boolAbstract flag (cannot be used directly in instances)
mixed: boolMixed content flag
id: Option<String>ID attribute value
default_attributes_apply: boolXSD 1.1: Whether schema-level defaultAttributes group applies to this type.
Defaults to true; set to false via defaultAttributesApply="false".
The resolver injects the schema-level attribute group into resolved_attribute_groups.
Implementations§
Source§impl ComplexTypeDef
impl ComplexTypeDef
Sourcepub fn new(name: Option<NameId>, target_namespace: Option<NameId>) -> Self
pub fn new(name: Option<NameId>, target_namespace: Option<NameId>) -> Self
Create a new complex type with empty content
Sourcepub fn is_anonymous(&self) -> bool
pub fn is_anonymous(&self) -> bool
Check if this is an anonymous type
Sourcepub fn has_simple_content(&self) -> bool
pub fn has_simple_content(&self) -> bool
Check if this type has simple content
Sourcepub fn has_complex_content(&self) -> bool
pub fn has_complex_content(&self) -> bool
Check if this type has complex content
Sourcepub fn allows_mixed(&self) -> bool
pub fn allows_mixed(&self) -> bool
Check if this type allows mixed content
Sourcepub fn type_key(&self, key: ComplexTypeKey) -> TypeKey
pub fn type_key(&self, key: ComplexTypeKey) -> TypeKey
Get the TypeKey for this complex type (requires its key)
Trait Implementations§
Source§impl Clone for ComplexTypeDef
impl Clone for ComplexTypeDef
Source§fn clone(&self) -> ComplexTypeDef
fn clone(&self) -> ComplexTypeDef
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more