/skd-validate — DCS validation (DataCompositionSchema)
Checks the structural correctness of the Template.xml of the data composition schema. Identifies format errors, broken references, duplicate names.
Parameters and command
| Parameter |
Description |
TemplatePath |
Path to Template.xml or the layout directory (auto-resolve to Ext/Template.xml) |
MaxErrors |
Max. errors before stopping (default 20) |
OutFile |
Write the result to a file |
powershell.exe -NoProfile -File .claude/skills/skd-validate/scripts/skd-validate.ps1 -TemplatePath "<путь>"
Checks (~30)
| Group |
What is checked |
| Root |
XML parse, root element DataCompositionSchema, default namespace, ns prefixes |
| DataSource |
Presence, name is not empty, type is valid (Local/External), uniqueness of names |
| DataSet |
Presence, xsi:type is valid, name is not empty, uniqueness, reference to dataSource, query is not empty |
| Fields |
dataPath is not empty, field is not empty, uniqueness of dataPath within the set |
| Links |
source/dest refer to existing sets, expressions are not empty |
| CalcFields |
dataPath is not empty, expression is not empty, uniqueness, collisions with set fields |
| TotalFields |
dataPath is not empty, expression is not empty |
| Parameters |
name is not empty, uniqueness |
| Templates |
name is not empty, uniqueness |
| GroupTemplates |
template refers to an existing template, templateType is valid |
| Variants |
Presence, name is not empty, settings element is present |
| Settings |
selection/filter/order refer to known fields, comparisonType is valid, structure items are typed |
Exit codes
| Code |
Value |
| 0 |
No errors (there may be warnings) |
| 1 |
There are errors |
Output example
=== Validation: Template.xml ===
[OK] XML parsed successfully
[OK] Root element: DataCompositionSchema
[OK] Default namespace correct
[OK] 1 dataSource(s) found, names unique
[OK] 1 dataSet(s) found, names unique
[OK] DataSet "НаборДанных1": 2 fields, dataPath unique
[OK] 1 totalField(s): dataPath and expression present
[OK] 1 settingsVariant(s) found
=== Result: 0 errors, 0 warnings ===
Verification
/skd-compile <JsonPath> <OutputPath> — генерация XML
/skd-validate <OutputPath> — проверка результата
/skd-info <OutputPath> — визуальная сводка