validate_schema
Validates an S1000D XML document against its declared XSD schema and returns line/column libxml2 errors, so you can detect schema violations before downstream checks.
Instructions
Validate one document against the S1000D XML schema (XSD) named by its xsi:noNamespaceSchemaLocation. The XSD is taken from the xml_schema_flat/ folder found under S1000D_SPEC_DIR (the issue is read from brex.xsd there). Errors are libxml2 messages with line/column. Returns schema-not-found with a reason when no suitable XSD is available.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| xml | No | The document as an XML string (alternative to path; max 5 MB). | |
| path | No | File path of the data module (or PM) to check. | |
| issue | No | S1000D issue of the XSD to use when several xml_schema_flat/ folders exist (e.g. "7", "4.2"). Default: inferred from the schemaLocation URL. | |
| maxErrors | No | Cap on errors returned (default 100). |