Validate all XML files in a tax return output directory using local XSD schema validation and EPO API test-mode validation. Reports pass/fail per file and highlights issues.
Run all available validators against every XML file in a filed tax return directory.
/validate-tax-return examples-cases-data/txtified/2024-2025/vysledek
If no path is given, ask the user which directory to validate.
Use the argument provided, or ask. Confirm the path exists. The directory is typically named vysledek/ and lives inside a txtified tax-year folder.
Find all *.xml files in the directory. Note their basenames — the filename prefix indicates the form type:
DPFO-* or oprDPFO-* → DPFDP7 (personal income tax)DPPDP9-* → DPPDP9 (corporate income tax)DPHDP3-* → DPHDP3 (VAT return)DPHKH1-* → DPHKH1 (VAT control statement)PREHLOSVC-* → ČSSZ OSVČ overview — not supported by our tools (different schema authority)For each supported XML file run:
.venv/bin/python -m czech_tax.cli validate <file>
Record: pass / fail and any error messages.
For each supported XML file run:
.venv/bin/python -m czech_tax.cli test-epo <file>
Record: pass / fail, and any EPO errors by severity (Critical / Warning / Informational).
Note: The TEST_REZIM informational message ("Podání nebylo přijato, protože bylo odesláno v testovacím režimu") is always present and expected — ignore it.
Print a summary table:
| File | XSD | EPO test | Issues |
|---|---|---|---|
filename.xml | ✓ / ✗ | ✓ / ✗ | List critical/warning messages |
PREHLOSVC-*.xml | — unsupported | — | ČSSZ schema, not EPO |
Flag these known patterns:
Kód klasifikace činnosti není uveden v číselníku): EPO's test API rejects NACE 649920 (crypto trading) even though production filings via STORMWARE were accepted. Note as a medium-severity discrepancy; do not treat as a blocking error unless filing through EPO directly.schemas.cssz.cz namespace — our validator only handles tax-authority EPO forms. Skip silently.dap_typ="D" in VetaD. If XSD and EPO both pass, the amendment is structurally valid.Report total files found, how many were validated, how many passed/failed each check, and any actionable issues requiring follow-up.
| Form prefix | Form type | Schema |
|---|---|---|
DPFO-, oprDPFO- | DPFDP7 | dpfdp7_epo2.xsd |
DPPDP9- | DPPDP9 | dppdp9_epo2.xsd |
DPHDP3- | DPHDP3 | dphdp3_epo2.xsd |
DPHKH1- | DPHKH1 | dphkh1_epo2.xsd |
PREHLOSVC- | OSVČ (ČSSZ) | Not supported |
Validated against examples-cases-data/txtified/2024-2025/vysledek/ — results:
DPFO-04482697-2024_radne_16.04.2025_Veta.xml → XSD ✓, EPO ✓ (NACE warning)oprDPFO-04482697-2024_dodat_04.06.2025_Veta.xml → XSD ✓, EPO ✓ (NACE warning)PREHLOSVC-04482697-2024_radne_16.04.2025_Veta.xml → unsupported (ČSSZ schema)