validateDtdAttributes

private fnvoid validateDtdAttributes( XmlDocument doc, XmlElement root, XmlInternalParseOptions options, XmlParserLimits limits) @safe

Validates #REQUIRED and #FIXED DTD attribute declarations for all elements.

Recursively walks the element tree and checks that:

  • All #REQUIRED attributes are present.
  • All #FIXED attributes (if present) match their declared fixed value.

    Parameters

    docThe document being validated.
    rootThe root element to start validation from.
    optionsParser options (used for entity expansion in default values).
    limitsParser limits.

    Throws

    XmlException with REQUIRED_ATTRIBUTE_MISSING if a required attribute is absent. XmlException with FIXED_ATTRIBUTE_MISMATCH if a fixed attribute has an incorrect value.