validate_facturx
Validate a Factur-X CII XML document against its profile's Schematron business rules, returning errors and warnings for compliance.
Instructions
Validate a Factur-X CII XML document against its profile's Schematron ruleset.
Scope: Schematron (SVRL) business-rule validation only, no XSD structural check. Returns is_valid, errors, and warnings (rule_id, location, text). Use this before embedding the XML into a PDF/A-3 or submitting via submit_flow.
Requires the optional saxonche extra (FR-XSLT2-1, resolved in
mcp-einvoicing-core 1.14.0): the bundled Factur-X 1.08 Schematron
stylesheets require XSLT 2.0, which lxml/libxslt (XSLT 1.0 only) cannot
compile. Install with pip install mcp-facture-electronique-fr[xslt2].
If it is missing, this tool returns level="unavailable" with
is_valid=None instead of raising.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| profile | Yes | Factur-X profile to validate against. One of: MINIMUM, BASICWL, BASIC, EN16931, EXTENDED, EXTENDED-CTC-FR. EXTENDED-CTC-FR is validated against the generic EXTENDED ruleset only — AFNOR has not published a CTC-FR-specific Schematron; French-specific rules beyond EXTENDED are not checked. | |
| xml_content | Yes | Factur-X CII XML content to validate (the embedded XML, not the PDF/A-3). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||