Checks Template.xml for structural errors that the 1C platform may silently ignore (possibly resulting in data loss or template corruption).
Usage
/mxl-validate <TemplatePath>
/mxl-validate <ProcessorName> <TemplateName>
Parameters
| Parameter | Required | Default | Description |
|---|---|---|---|
| TemplatePath | no | — | Direct path to Template.xml |
| ProcessorName | no | — | Processor name (alternative to path) |
| TemplateName | no | — | Template name (alternative to path) |
| SrcDir | no | src |
Source directory |
| MaxErrors | no | 20 | Stop after N errors |
Specify either -TemplatePath, or both -ProcessorName и -TemplateName.
Command
powershell.exe -NoProfile -File .claude/skills/mxl-validate/scripts/mxl-validate.ps1 -TemplatePath "<путь>"
Or by processor/template name:
powershell.exe -NoProfile -File .claude/skills/mxl-validate/scripts/mxl-validate.ps1 -ProcessorName "<Имя>" -TemplateName "<Макет>" [-SrcDir "<каталог>"]
Checks performed
| # | Check | Severity |
|---|---|---|
| 1 | <height> >= maximum row index + 1 |
ERROR |
| 2 | <vgRows> <= <height> |
WARN |
| 3 | Cell format indices (<f>) within the format palette |
ERROR |
| 4 | <formatIndex> rows and columns within the palette |
ERROR |
| 5 | Column indices in cells (<i>) within the number of columns (taking the set into account) |
ERROR |
| 6 | <columnsID> rows reference an existing column set |
ERROR |
| 7 | <columnsID> in merge/namedItem references an existing set |
ERROR |
| 8 | Named area ranges within the document bounds | ERROR |
| 9 | Merge ranges within the document bounds | ERROR |
| 10 | Font indices in formats within the font palette | ERROR |
| 11 | Border line indices in formats within the line palette | ERROR |
| 12 | pictureIndex of drawings references an existing picture |
ERROR |
Output
=== Validation: ИмяМакета ===
[OK] height (40) >= max row index + 1 (40), rowsItem count=34
[OK] Font refs: max=3, palette size=4
[ERROR] Row 15: cell format index 38 > format palette size (37)
[OK] Column indices: max in default set=32, default column count=33
---
Errors: 1, Warnings: 0
Return code: 0 = all checks passed, 1 = there are errors.
When to use
- After generating a template: run the validator to identify structural errors before building the EPF
- After editing Template.xml: ensure that indexes and references remain valid
- On errors: fix the issues found and restart until it passes completely
Overflow protection
Stops after 20 errors by default (configurable via -MaxErrors). The final line with the error/warning count is always output.