Skip to main content

Module schematron

Module schematron 

Source
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 context attributes
  • Abstract rules and extends inheritance
  • 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§

SchematronDiagnostic
A Schematron diagnostic message definition.
SchematronPattern
A single Schematron pattern — an assert or report assertion.
SchematronPhase
A Schematron phase — selects a subset of patterns for validation.
SchematronRule
A Schematron rule — matches nodes via a context XPath expression.
SchematronSchema
A compiled ISO Schematron schema.
SchematronValidCtxt
Validation context for Schematron schema validation.

Enums§

SchematronPatternType
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.
xmlSchematronFree
Free a Schematron schema.
xmlSchematronFreeParserCtxt
Free a Schematron parser context.
xmlSchematronFreeValidCtxt
Free a Schematron validation context.
xmlSchematronNewMemParserCtxt
Create a new Schematron parser context from a memory buffer.
xmlSchematronNewParserCtxt
Create a new Schematron parser context.
xmlSchematronNewValidCtxt
Create a new Schematron validation context.
xmlSchematronParse
Parse a Schematron schema.
xmlSchematronValidateDoc
Validate a document against a Schematron schema.