Turns an XDTO package into an ordinary XML schema — readable and editable.
Replaces reading Ext/Package.bin directly.
Parameters
| Parameter | Required | Description |
|---|---|---|
PackagePath |
yes | Package directory, path to Ext/Package.bin or to <Имя>.xml metadata object. Alias — -Path |
OutFile |
no | Write the schema to a file (UTF-8 with BOM). Without it — output to stdout |
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/xdto-decompile.ps1" -PackagePath "<путь>"
Examples:
... -PackagePath src/XDTOPackages/ОбменСБанком
... -PackagePath src/XDTOPackages/ОбменСБанком -OutFile bank.xsd
Reworking the schema entirely
/xdto-decompile → edit XSD → /xdto-compile -Force returns the package without loss,
including the name, synonym and comment of the metadata object — they are exported
into xs:annotation/xs:appinfo.
This same path gives a versioned copy of the package: change in the schema targetNamespace and assemble
it with -Name of the new package — the name and synonym are set by the flags /xdto-compile, inside
the schema they do not need to be edited. When changing the namespace, fix and the declaration of xmlns
with the same URI: internal references use it as a prefix. Replacing all occurrences of the
string is not allowed — this would break the import of a namespace for which the old URI is
a prefix (urn:пример:обмен и urn:пример:обмен:legacy).
This path is needed when the schema is changed extensively or you first need to understand how it
is structured. To fix a single property, you do not need to read the entire schema — /xdto-edit.
If you need not the schema but a summary of "what to assign and what is required" — /xdto-info.
The schema may contain attributes with the prefix xdto: — this is how what
XML Schema cannot express is recorded (for example nillable of an attribute). The schema nevertheless remains
valid, validators ignore such attributes. Usually they do not need to be touched; the meaning of
each is described in xsd-reference.md of the skill /xdto-compile.
Handing the schema outside
The resulting XSD can be given to the counterparty as is — it is valid and does not lose
package data. The standard "Export XML schema" command in the Configurator is
worse for this: it loses nillable on attribute properties.