mirror of
https://github.com/Nikolay-Shirokov/cc-1c-skills.git
synced 2026-07-31 08:47:45 +03:00
fix(skd-decompile): чтение DataSetUnion inner <item> элементов
Build-DataSet для типа DataSetUnion теперь читает <item xsi:type="..."> (платформенный формат), сохранена обратная совместимость с <dataSet> для XML, сгенерированных предыдущими версиями skd-compile. Эффект на sample30: -12000 строк diff (LOST <v8:item>/<lang>/<content> в полях inner-Union datasets). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.7
parent
eac0ae5a02
commit
3453e64bea
@@ -1,4 +1,4 @@
|
|||||||
# skd-decompile v0.22 — Decompile 1C DCS Template.xml to JSON DSL (draft)
|
# skd-decompile v0.23 — Decompile 1C DCS Template.xml to JSON DSL (draft)
|
||||||
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
|
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
|
||||||
param(
|
param(
|
||||||
[Parameter(Mandatory)]
|
[Parameter(Mandatory)]
|
||||||
@@ -1805,7 +1805,10 @@ function Build-DataSet {
|
|||||||
'DataSetUnion' {
|
'DataSetUnion' {
|
||||||
$nested = @()
|
$nested = @()
|
||||||
$ni = 0
|
$ni = 0
|
||||||
foreach ($nNode in $dsNode.SelectNodes("r:dataSet", $ns)) {
|
# Inner Union datasets are wrapped as <item xsi:type="..."> in real 1C output.
|
||||||
|
# Accept <dataSet> too for backward compatibility with older builds.
|
||||||
|
$innerNodes = @($dsNode.SelectNodes("r:item", $ns)) + @($dsNode.SelectNodes("r:dataSet", $ns))
|
||||||
|
foreach ($nNode in $innerNodes) {
|
||||||
$nested += (Build-DataSet -dsNode $nNode -loc "$loc/items[$ni]")
|
$nested += (Build-DataSet -dsNode $nNode -loc "$loc/items[$ni]")
|
||||||
$ni++
|
$ni++
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user