pub struct ElementDecl {
pub name: QName,
pub type_def: TypeRef,
pub nillable: bool,
pub default: Option<String>,
pub fixed: Option<String>,
pub abstract_: bool,
pub substitution_group: Option<QName>,
pub block: BlockSet,
pub final_: BlockSet,
pub identity: Vec<IdentityConstraint>,
}Expand description
<xs:element> declaration — top-level or local.
Fields§
§name: QName§type_def: TypeRefResolved type — may be a simple or complex type. Anonymous inline types end up here too.
nillable: boolxs:nillable attribute. xsi:nil="true" instances on this
element are valid only when this is true.
default: Option<String>default="…" value applied when the element is empty.
fixed: Option<String>fixed="…" value the element must match if present.
abstract_: boolabstract="true" — element cannot appear in instances; only
substitutes for it can.
substitution_group: Option<QName>Head of substitution group this element substitutes into, resolved by the schema compiler.
block: BlockSetblock="restriction|extension|substitution" — disallowed
derivation modes for substitutes. Stored as a flag set.
final_: BlockSetfinal="restriction|extension" — derivation forms that must not
derive from this element.
identity: Vec<IdentityConstraint><xs:key> / <xs:keyref> / <xs:unique> constraints declared
directly on this element. Empty for the common case. Each
constraint scopes to the subtree rooted at this element.