Skip to main content

Crate html_conform

Crate html_conform 

Source
Expand description

HTML5 conformance checking with browser-style error recovery.

check/check_with_options combine six finding sources, in order: HTML parser diagnostics, RELAX NG schema (content-model) validation, Schematron-style assertion (co-constraint) checking, <script type="importmap"|"speculationrules"> JSON content validation (src/scripts.rs — a value/content-format check like the RELAX NG datatypes, just on element text content instead of an attribute), and <meta http-equiv="Content-Security-Policy"> enforcement against inline script/style content elsewhere in the document (src/csp_enforcement.rs — a genuine cross-element check needing a real CSP source-list parser, not expressible as a rules/*.sch rule or a w:* datatype), and table cell-grid integrity (src/table_integrity.rs — laying a table out over its colspan/rowspan values needs mutable state carried forward across cells, which XPath 1.0 has no way to express).

Structs§

CheckOptions
Options that control which diagnostics are included in a check report.
CheckReport
The result of checking one HTML document.
Finding
A single conformance or parser finding.
SourceLocation
A source location in the checked HTML input.

Enums§

CheckError
A technical failure that prevented a document from being checked.
Severity
The severity of a conformance finding.

Functions§

check
Checks a complete HTML document with the default options.
check_with_options
Checks a complete HTML document with explicit options.