xdto-compile

Builds a 1C XDTO package from an XML Schema (XSD) file.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Manually authoring 1C XDTO packages requires deep knowledge of the platform's internal XML model (Package.bin), attribute ordering, and namespace prefix schemes. This Skill converts a standard XML Schema (XSD) into a ready-to-register XDTO package, handling the translation of XSD constructs into the XDTO model and warning about constructs that cannot be mapped exactly.

Core Features & Use Cases

  • XSD to XDTO conversion: Generates XDTOPackages/<Name>.xml, Ext/Package.bin, and registers the package in Configuration.xml from a schema file or inline schema string.
  • Loss-mapping warnings: Reports XSD constructs without exact XDTO equivalents (nested xs:choice/xs:sequence flattening, particle multiplicity, xs:all, substitutionGroup) so simplifications are never silent.
  • Metadata and annotation support: Reads package name, synonym, and comment from xs:appinfo blocks and supports xdto: namespace annotations for XDTO-only features like nillable attributes.
  • Use Case: You receive a bank's XSD for client-bank exchange. Run the skill with the XSD path and your configuration source directory, review the warnings, then validate with /xdto-validate and load with /db-load-xml.

Quick Start

Ask the AI to create an XDTO package from your XSD file, for example: "Create an XDTO package from bank.xsd in my configuration sources at src, named ОбменСБанком."

Frequently Asked Questions about xdto-compile

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

FAQPage Schema
How do I create a 1C XDTO package from an XSD file?

Run the xdto-compile script with -XsdPath pointing to your schema file and -OutputDir pointing to the configuration source directory containing Configuration.xml. The skill generates the package XML, Package.bin model, and registers it in the configuration automatically.

What XSD constructs are not supported by the 1C XDTO model?

Nested xs:sequence and xs:choice are flattened into a flat property list, xs:all becomes a sequence, and particle-level multiplicity, substitutionGroup, xs:key/keyref/unique, and xs:redefine are not expressible. The skill emits a warning for each approximation so no simplification is silent.

Can I set the XDTO package name and synonym from the schema itself?

Yes, add an xs:annotation/xs:appinfo block with an xdto:package element containing xdto:name, xdto:synonym, and xdto:comment. Command-line parameters -Name, -Synonym, and -Comment take priority over these schema values.

Why does my XDTO package resolve imported types as xs:anyType?

xs:import is resolved by namespace among packages already in the configuration. If no package with that target namespace exists, the platform silently substitutes xs:anyType. Build dependency packages first, then the dependent package, and verify with /xdto-validate.

Does xdto-compile work on configurations under vendor support?

The script includes a support guard that reads Ext/ParentConfigurations.bin and blocks edits to locked vendor objects or read-only configurations by default. You can adjust this via editingAllowedCheck (deny, warn, off) in .v8-project.json.

How do I update an existing XDTO package with a changed schema?

Re-run the skill with the -Force parameter to overwrite the existing package, since by default it refuses to overwrite an already built package. For small targeted changes, use the /xdto-edit skill instead of a full rebuild.