Skip to main content

validate_dtd

Function validate_dtd 

Source
pub unsafe fn validate_dtd(
    ctxt: *mut _xmlValidCtxt,
    doc: *mut _xmlDoc,
    dtd: *mut _xmlDtd,
) -> c_int
Expand description

Validate a DTD’s declarations (element/attribute declarations).

§UPSTREAM-PARITY

int xmlValidateDtd(xmlValidCtxtPtr ctxt,
                   xmlDocPtr doc,
                   xmlDtdPtr dtd);

Validates:

  • Attribute declarations (default values, enumeration values, notation refs)
  • Element content models reference only declared elements

Returns 1 if the DTD is valid, 0 otherwise.

§SAFETY

  • ctxt, doc, dtd may be NULL.