xdto-validate

Validates 1C XDTO packages for structural, reference, and registration errors.

578|108|Updated Feb 8, 2026
One-click install
npx skills add https://github.com/Nikolay-Shirokov/cc-1c-skills --skill xdto-validate
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: xdto-validate
Source: https://github.com/Nikolay-Shirokov/cc-1c-skills/tree/main/.claude/skills/xdto-validate
Command: npx skills add https://github.com/Nikolay-Shirokov/cc-1c-skills --skill xdto-validate

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires lxml, and includes scripts (resource) components.

What problem does it solve?

The 1C platform silently accepts some defective XDTO packages — for example, it substitutes unresolved foreign types with xs:anyType without any error — so broken packages only surface as runtime failures. This Skill statically validates a package before it is loaded into the infobase, catching defects the platform never reports.

Core Features & Use Cases

  • Model validation: Checks XML well-formedness, targetNamespace, top-level element order (import → property → valueType → objectType), duplicate type names, and type reference resolution including Clark notation and prefix namespaces.
  • Semantic checks: Detects silent degradation to xs:anyType, unused imports, invalid facets (minLength/maxLength, totalDigits/fractionDigits, whiteSpace, variety), invalid property form/bounds, fixed-without-default, and inheritance kind mismatches between objectType and valueType.
  • Configuration integration: Verifies the metadata object Name/Namespace, registration in Configuration.xml, targetNamespace uniqueness across packages, and that all imported namespaces resolve to packages present in the configuration.
  • Use Case: After creating or editing an XDTO package with xdto-compile or xdto-edit, run validation before db-load-xml and db-update to catch errors like a missing <import> or wrong element order that would make the platform reject the package during configuration update.

Quick Start

Ask the agent to validate the XDTO package at the given path, for example: run xdto-validate on XDTOPackages/MyPackage and report any errors.

Frequently Asked Questions about xdto-validate

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I validate a 1C XDTO package before loading it into the infobase?

Run the validation script with the package directory, Ext/Package.bin file, or the metadata XML file as the path argument. It reports each finding as [ERROR] or [WARN] with an explanation and exits with code 1 when errors are found.

What errors does XDTO package validation detect in 1C?

It detects malformed XML, missing targetNamespace, wrong top-level element order, duplicate type names, unresolvable type references, undeclared imports, invalid facets, invalid property bounds, and missing registration in Configuration.xml.

Why does my XDTO package load but return unstructured values at runtime?

The platform silently replaces unresolved foreign types with xs:anyType during XML schema import, so the package appears loaded but the XDTO factory returns unstructured values. Static validation flags anyType properties combined with imports as this exact defect.

Does the validator work on both Windows and Linux?

Yes, it ships as both a PowerShell script and a Python port with matching behavior. The Python version requires the lxml library and handles non-URI namespaces that libxml2 would otherwise reject.

What is the difference between ERROR and WARN in validation output?

ERROR means the platform will reject the package or accept it incorrectly, such as a missing import or wrong element order. WARN means the package works but carries a risk worth knowing, like a missing BOM or unused import.