Skip to main content

validate_element_structure

Function validate_element_structure 

Source
pub fn validate_element_structure(
    attrs: &AttributeMap,
    name_table: &NameTable,
    ctx: &ValidationContext,
) -> SchemaResult<()>
Expand description

Validate element declaration structural constraints

Top-level elements:

  • Must have name attribute
  • Must NOT have ref, minOccurs, maxOccurs, or form attributes

Local elements:

  • Must have exactly one of name OR ref
  • If ref is present, type/default/fixed/nillable/block/final are prohibited