Skip to main content

validate_attribute_structure

Function validate_attribute_structure 

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

Validate attribute declaration structural constraints

Top-level attributes:

  • Must have name attribute
  • Must NOT have ref, use, or form attributes

Local attributes:

  • Must have exactly one of name OR ref
  • If ref is present, type/form are prohibited (src-attribute.3.2)
  • default and fixed ARE allowed on refs (they set the attribute use’s value constraint)