Skip to main content

validate

Function validate 

Source
pub fn validate(doc: &Document) -> ValidationResult
Expand description

Validate a parsed Document, running both structural and semantic checks.

Returns a ValidationResult that collects all errors and warnings (rather than stopping at the first problem). Check ValidationResult::is_valid to determine whether the document is conformant.

ยงErrors

This function does not return Err; all findings are collected in the returned ValidationResult. Returns Err only when a validation precondition check fails (not currently possible).