Direct answer
No. Restoration pipelines should not enforce schema validation automatically by default. A conditional policy is safer: verify a backup-time checksum first, then re-validate only when the schema version has changed or the checksum does not match.
Why automatic enforcement is risky
Most XML parsers default to non-validating mode; validation must be explicitly enabled. When enabled, error behavior varies: some parsers throw fatal exceptions, while others log and continue. If a pipeline auto-validates without a fail-fast configuration, it may either halt on benign issues or silently accept corrupt data.
Schema evolution compounds this. A document that was valid against schema v1 may fail against v2. Without per-document schema version metadata, automatic validation during restoration can reject otherwise recoverable data.
Confirmed facts vs. likely explanation
Confirmed: Parsers such as Xerces-J, Saxon-HE, libxml2, and MSXML 6 support schema validation but require explicit configuration. JAXP DocumentBuilderFactory needs both setSchema() and setValidating(true); omitting either disables validation silently. Validation on large files typically adds measurable CPU and memory overhead.
Likely explanation: The combination of parser variability, schema drift, and performance cost explains why teams see inconsistent data-reliability guarantees across restoration pipelines.
Recommended steps
- At backup time, validate the document, record the schema version, and store a checksum.
- At restoration time, verify the checksum first. This is fast and detects corruption.
- Re-validate only if the stored schema version differs from the current schema or the checksum fails.
- If automatic validation is mandatory, configure the parser to fail-fast (for example, by supplying a strict error handler) and test with known-valid and known-invalid samples.
Weighing performance impact
Measure validation overhead on representative file sizes before enforcing it. For large documents, checksum verification is orders of magnitude cheaper than full schema validation. Reserve re-validation for exception paths so recovery time objectives are not impacted.
Parser configuration note
Exact version-specific defaults for fatal-error behavior vary and should be verified against your parser's release notes. Do not assume that enabling validation alone guarantees a hard stop on violation.
Missing diagnostic
Do you store schema version metadata alongside each backup? If not, automatic validation is riskier because the pipeline cannot know which schema to apply.