Expand description
Schematron implementation (§27, §85 Phase 6).
ISO Schematron validation support. libxml2 implements a subset (Schematron 1.x style).
Phase 6: Complete — Schematron schema parsing, document validation, and C ABI exports are implemented.
§UPSTREAM-PARITY
This module implements a functional ISO Schematron validator following libxml2’s observable behavior. The implementation covers:
- Full XML syntax for ISO Schematron schema definitions
- Assert (
<assert>) and report (<report>) pattern validation - XPath context matching via rule
contextattributes - Abstract rules and
extendsinheritance - Phases with
<active>pattern references - Namespace prefix mappings via
<ns> - Diagnostic messages with
<name/>and<value-of/>expansion - Basic
<include>support <let>,<param>,<diagnostics>,<diagnostic>,<dir>,<span>,<emph>,<p>,<caption>parsing
Deviations from the ISO Schematron specification that match libxml2’s behavior are intentional.
Structs§
- Schematron
Diagnostic - A Schematron diagnostic message definition.
- Schematron
Pattern - A single Schematron pattern — an assert or report assertion.
- Schematron
Phase - A Schematron phase — selects a subset of patterns for validation.
- Schematron
Rule - A Schematron rule — matches nodes via a context XPath expression.
- Schematron
Schema - A compiled ISO Schematron schema.
- Schematron
Valid Ctxt - Validation context for Schematron schema validation.
Enums§
- Schematron
Pattern Type - The type of a Schematron pattern (assert or report).
Functions§
- schematron_
parse - Parse a Schematron schema from an XML string.
- schematron_
parse_ schema - Parse a Schematron schema from an XML string.
- schematron_
parse_ ⚠schema_ doc - Parse a Schematron schema from a parsed XML document.
- schematron_
validate_ ⚠doc - Validate an XML document against a Schematron schema.
- schematron_
validate_ ⚠doc_ schema - Validate a document against a Schematron schema.
- xmlSchematron
Free ⚠ - Free a Schematron schema.
- xmlSchematron
Free ⚠Parser Ctxt - Free a Schematron parser context.
- xmlSchematron
Free ⚠Valid Ctxt - Free a Schematron validation context.
- xmlSchematron
NewMem ⚠Parser Ctxt - Create a new Schematron parser context from a memory buffer.
- xmlSchematron
NewParser ⚠Ctxt - Create a new Schematron parser context.
- xmlSchematron
NewValid ⚠Ctxt - Create a new Schematron validation context.
- xmlSchematron
Parse ⚠ - Parse a Schematron schema.
- xmlSchematron
Validate ⚠Doc - Validate a document against a Schematron schema.