mirror of
https://github.com/Nikolay-Shirokov/cc-1c-skills.git
synced 2026-07-18 08:39:40 +03:00
Compare commits
6 Commits
f91b569564
...
3eaa7ffa3b
| Author | SHA1 | Date | |
|---|---|---|---|
| 3eaa7ffa3b | |||
| 98ebb478ee | |||
| fb67b1b80d | |||
| 79db5de6ee | |||
| 23d2cb42de | |||
| 511bfe7fdf |
@@ -1,4 +1,4 @@
|
||||
# skd-compile v1.22 — Compile 1C DCS from JSON
|
||||
# skd-compile v1.23 — Compile 1C DCS from JSON
|
||||
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
|
||||
param(
|
||||
[string]$DefinitionFile,
|
||||
@@ -55,7 +55,7 @@ function X {
|
||||
|
||||
function Esc-Xml {
|
||||
param([string]$s)
|
||||
return $s.Replace('&','&').Replace('<','<').Replace('>','>').Replace('"','"')
|
||||
return $s.Replace('&','&').Replace('<','<').Replace('>','>')
|
||||
}
|
||||
|
||||
function Resolve-QueryValue {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python3
|
||||
# skd-compile v1.22 — Compile 1C DCS from JSON
|
||||
# skd-compile v1.23 — Compile 1C DCS from JSON
|
||||
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
|
||||
import argparse
|
||||
import json
|
||||
@@ -10,7 +10,7 @@ import uuid
|
||||
|
||||
|
||||
def esc_xml(s):
|
||||
return s.replace('&', '&').replace('<', '<').replace('>', '>').replace('"', '"')
|
||||
return s.replace('&', '&').replace('<', '<').replace('>', '>')
|
||||
|
||||
def fmt_dec(v):
|
||||
"""Format decimal: 30.0 → '30', 16.625 → '16.625' (match PS1 output)."""
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# skd-edit v1.18 — Atomic 1C DCS editor
|
||||
# skd-edit v1.22 — Atomic 1C DCS editor
|
||||
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
|
||||
param(
|
||||
[Parameter(Mandatory)]
|
||||
@@ -28,6 +28,10 @@ param(
|
||||
$ErrorActionPreference = "Stop"
|
||||
[Console]::OutputEncoding = [System.Text.Encoding]::UTF8
|
||||
|
||||
# Dirty flag — set to $true by every successful mutation. If still $false at save time,
|
||||
# the file is left untouched (NO-OP operations like [WARN] not found don't rewrite).
|
||||
$script:Dirty = $false
|
||||
|
||||
# --- 1. Resolve path ---
|
||||
|
||||
if (-not $TemplatePath.EndsWith(".xml")) {
|
||||
@@ -46,7 +50,7 @@ $resolvedPath = (Resolve-Path $TemplatePath).Path
|
||||
|
||||
function Esc-Xml {
|
||||
param([string]$s)
|
||||
return $s.Replace('&','&').Replace('<','<').Replace('>','>').Replace('"','"')
|
||||
return $s.Replace('&','&').Replace('<','<').Replace('>','>')
|
||||
}
|
||||
|
||||
function Resolve-QueryValue {
|
||||
@@ -179,6 +183,8 @@ function Read-FieldProperties($fieldEl) {
|
||||
$props = @{
|
||||
dataPath = ""; field = ""; title = ""; type = ""
|
||||
roles = @(); restrict = @()
|
||||
_rawTitle = $null
|
||||
_unknownChildren = @()
|
||||
}
|
||||
|
||||
foreach ($ch in $fieldEl.ChildNodes) {
|
||||
@@ -187,19 +193,35 @@ function Read-FieldProperties($fieldEl) {
|
||||
"dataPath" { $props.dataPath = $ch.InnerText.Trim() }
|
||||
"field" { $props.field = $ch.InnerText.Trim() }
|
||||
"title" {
|
||||
# Extract text from LocalStringType
|
||||
# Preserve full multi-lang title OuterXml — used to keep en/uk/etc.
|
||||
# siblings when shorthand overrides only the ru content. Strip xmlns
|
||||
# redeclarations that OuterXml adds for sub-elements.
|
||||
$raw = $ch.OuterXml
|
||||
$raw = [regex]::Replace($raw, ' xmlns(?::\w+)?="[^"]*"', '')
|
||||
$props._rawTitle = $raw
|
||||
# Also extract ru content as plain string (backward compat — used by
|
||||
# external consumers reading $existing.title).
|
||||
foreach ($item in $ch.ChildNodes) {
|
||||
if ($item.NodeType -eq 'Element' -and $item.LocalName -eq 'item') {
|
||||
$lang = $null; $content = $null
|
||||
foreach ($gc in $item.ChildNodes) {
|
||||
if ($gc.NodeType -eq 'Element' -and $gc.LocalName -eq 'content') {
|
||||
$props.title = $gc.InnerText.Trim()
|
||||
}
|
||||
if ($gc.NodeType -eq 'Element' -and $gc.LocalName -eq 'lang') { $lang = $gc.InnerText.Trim() }
|
||||
if ($gc.NodeType -eq 'Element' -and $gc.LocalName -eq 'content') { $content = $gc.InnerText.Trim() }
|
||||
}
|
||||
if ($lang -eq 'ru' -and $null -ne $content) { $props.title = $content }
|
||||
}
|
||||
}
|
||||
}
|
||||
"valueType" {
|
||||
# Read type info — store the raw element for now, we'll use type from parsed if overridden
|
||||
# Preserve the entire <valueType> OuterXml so rebuild can re-emit qualifiers
|
||||
# (StringQualifiers, NumberQualifiers, DateQualifiers, etc.) that would
|
||||
# otherwise be lost. Also extract Type string for type-override shorthand.
|
||||
$raw = $ch.OuterXml
|
||||
# .NET OuterXml re-declares xmlns on every element where the prefix is in
|
||||
# scope (because the fragment is treated as standalone). Strip these since
|
||||
# the parent context at insertion point already provides them.
|
||||
$raw = [regex]::Replace($raw, ' xmlns(?::\w+)?="[^"]*"', '')
|
||||
$props["_rawValueType"] = $raw
|
||||
$typeEl = $null
|
||||
foreach ($gc in $ch.ChildNodes) {
|
||||
if ($gc.NodeType -eq 'Element' -and $gc.LocalName -eq 'Type') {
|
||||
@@ -230,6 +252,13 @@ function Read-FieldProperties($fieldEl) {
|
||||
}
|
||||
}
|
||||
}
|
||||
default {
|
||||
# Defense in depth: preserve OuterXml of unknown children so rebuild
|
||||
# doesn't silently drop them (custom <editFormat>, <appearance>, etc.).
|
||||
$raw = $ch.OuterXml
|
||||
$raw = [regex]::Replace($raw, ' xmlns(?::\w+)?="[^"]*"', '')
|
||||
$props._unknownChildren += $raw
|
||||
}
|
||||
}
|
||||
}
|
||||
return $props
|
||||
@@ -723,7 +752,7 @@ function Build-ValueTypeXml {
|
||||
|
||||
if ($typeStr -eq "boolean") {
|
||||
$lines += "$indent<v8:Type>xs:boolean</v8:Type>"
|
||||
return $lines -join "`r`n"
|
||||
return $lines -join "`n"
|
||||
}
|
||||
|
||||
if ($typeStr -match '^string(\((\d+)\))?$') {
|
||||
@@ -733,7 +762,7 @@ function Build-ValueTypeXml {
|
||||
$lines += "$indent`t<v8:Length>$len</v8:Length>"
|
||||
$lines += "$indent`t<v8:AllowedLength>Variable</v8:AllowedLength>"
|
||||
$lines += "$indent</v8:StringQualifiers>"
|
||||
return $lines -join "`r`n"
|
||||
return $lines -join "`n"
|
||||
}
|
||||
|
||||
if ($typeStr -match '^decimal\((\d+),(\d+)(,nonneg)?\)$') {
|
||||
@@ -746,7 +775,7 @@ function Build-ValueTypeXml {
|
||||
$lines += "$indent`t<v8:FractionDigits>$fraction</v8:FractionDigits>"
|
||||
$lines += "$indent`t<v8:AllowedSign>$sign</v8:AllowedSign>"
|
||||
$lines += "$indent</v8:NumberQualifiers>"
|
||||
return $lines -join "`r`n"
|
||||
return $lines -join "`n"
|
||||
}
|
||||
|
||||
if ($typeStr -match '^(date|dateTime)$') {
|
||||
@@ -758,26 +787,26 @@ function Build-ValueTypeXml {
|
||||
$lines += "$indent<v8:DateQualifiers>"
|
||||
$lines += "$indent`t<v8:DateFractions>$fractions</v8:DateFractions>"
|
||||
$lines += "$indent</v8:DateQualifiers>"
|
||||
return $lines -join "`r`n"
|
||||
return $lines -join "`n"
|
||||
}
|
||||
|
||||
if ($typeStr -eq "StandardPeriod") {
|
||||
$lines += "$indent<v8:Type>v8:StandardPeriod</v8:Type>"
|
||||
return $lines -join "`r`n"
|
||||
return $lines -join "`n"
|
||||
}
|
||||
|
||||
if ($typeStr -match '^(CatalogRef|DocumentRef|EnumRef|ChartOfAccountsRef|ChartOfCharacteristicTypesRef)\.') {
|
||||
$lines += "$indent<v8:Type xmlns:d5p1=`"http://v8.1c.ru/8.1/data/enterprise/current-config`">d5p1:$(Esc-Xml $typeStr)</v8:Type>"
|
||||
return $lines -join "`r`n"
|
||||
return $lines -join "`n"
|
||||
}
|
||||
|
||||
if ($typeStr.Contains('.')) {
|
||||
$lines += "$indent<v8:Type xmlns:d5p1=`"http://v8.1c.ru/8.1/data/enterprise/current-config`">d5p1:$(Esc-Xml $typeStr)</v8:Type>"
|
||||
return $lines -join "`r`n"
|
||||
return $lines -join "`n"
|
||||
}
|
||||
|
||||
$lines += "$indent<v8:Type>$(Esc-Xml $typeStr)</v8:Type>"
|
||||
return $lines -join "`r`n"
|
||||
return $lines -join "`n"
|
||||
}
|
||||
|
||||
function Build-MLTextXml {
|
||||
@@ -789,7 +818,29 @@ function Build-MLTextXml {
|
||||
$lines += "$indent`t`t<v8:content>$(Esc-Xml $text)</v8:content>"
|
||||
$lines += "$indent`t</v8:item>"
|
||||
$lines += "$indent</$tag>"
|
||||
return $lines -join "`r`n"
|
||||
return $lines -join "`n"
|
||||
}
|
||||
|
||||
# Patches the ru <v8:content> within an existing multi-lang title OuterXml, preserving
|
||||
# en/uk/etc. siblings. Used when modify-* operates with a title-override shorthand on a
|
||||
# field/parameter that already has multi-language titles (typical in ERP/БП/ЗУП).
|
||||
# If no ru item exists, one is prepended before the first existing item.
|
||||
function Patch-MLTextRu {
|
||||
param([string]$rawOuterXml, [string]$newRuText, [string]$indent)
|
||||
$escaped = Esc-Xml $newRuText
|
||||
$ruItemPat = '(<v8:item>\s*<v8:lang>ru</v8:lang>\s*<v8:content>)[^<]*(</v8:content>\s*</v8:item>)'
|
||||
if ([regex]::IsMatch($rawOuterXml, $ruItemPat)) {
|
||||
return [regex]::Replace($rawOuterXml, $ruItemPat, { param($m) $m.Groups[1].Value + $escaped + $m.Groups[2].Value })
|
||||
}
|
||||
# No ru item — prepend one inside the title element, before first <v8:item>.
|
||||
$prep = "$indent`t<v8:item>`n$indent`t`t<v8:lang>ru</v8:lang>`n$indent`t`t<v8:content>$escaped</v8:content>`n$indent`t</v8:item>"
|
||||
if ($rawOuterXml -match '<v8:item>') {
|
||||
$re = New-Object System.Text.RegularExpressions.Regex('(\s*)<v8:item>')
|
||||
return $re.Replace($rawOuterXml, "`n$prep`$1<v8:item>", 1)
|
||||
}
|
||||
# Empty title — inject after opening tag.
|
||||
$re2 = New-Object System.Text.RegularExpressions.Regex('(<(?:\w+:)?title[^>]*>)')
|
||||
return $re2.Replace($rawOuterXml, "`$1`n$prep`n$indent", 1)
|
||||
}
|
||||
|
||||
function Build-RoleXml {
|
||||
@@ -808,7 +859,7 @@ function Build-RoleXml {
|
||||
}
|
||||
}
|
||||
$lines += "$indent</role>"
|
||||
return $lines -join "`r`n"
|
||||
return $lines -join "`n"
|
||||
}
|
||||
|
||||
function Build-RestrictionXml {
|
||||
@@ -830,7 +881,7 @@ function Build-RestrictionXml {
|
||||
}
|
||||
}
|
||||
$lines += "$indent</useRestriction>"
|
||||
return $lines -join "`r`n"
|
||||
return $lines -join "`n"
|
||||
}
|
||||
|
||||
function Build-FieldFragment {
|
||||
@@ -842,7 +893,16 @@ function Build-FieldFragment {
|
||||
$lines += "$i`t<dataPath>$(Esc-Xml $parsed.dataPath)</dataPath>"
|
||||
$lines += "$i`t<field>$(Esc-Xml $parsed.field)</field>"
|
||||
|
||||
if ($parsed.title) {
|
||||
# Title: prefer raw multi-lang title (preserves en/uk/etc.). When shorthand provides
|
||||
# a new ru text, patch ru content inside the raw title; otherwise emit raw as-is.
|
||||
# When no raw title exists, fall back to ru-only build from shorthand.
|
||||
if ($parsed._rawTitle) {
|
||||
if ($parsed.title -and $parsed.title -ne $parsed._existingTitleRu) {
|
||||
$lines += "$i`t" + (Patch-MLTextRu $parsed._rawTitle $parsed.title "$i`t")
|
||||
} else {
|
||||
$lines += "$i`t" + $parsed._rawTitle
|
||||
}
|
||||
} elseif ($parsed.title) {
|
||||
$lines += (Build-MLTextXml -tag "title" -text $parsed.title -indent "$i`t")
|
||||
}
|
||||
|
||||
@@ -853,14 +913,26 @@ function Build-FieldFragment {
|
||||
$roleXml = Build-RoleXml -roles $parsed.roles -indent "$i`t"
|
||||
if ($roleXml) { $lines += $roleXml }
|
||||
|
||||
if ($parsed.type) {
|
||||
if ($parsed.rawValueType) {
|
||||
# Preserve original <valueType> verbatim — keeps qualifiers (StringQualifiers,
|
||||
# NumberQualifiers, DateQualifiers, …) that aren't expressible via shorthand.
|
||||
$lines += "$i`t" + $parsed.rawValueType
|
||||
} elseif ($parsed.type) {
|
||||
$lines += "$i`t<valueType>"
|
||||
$lines += (Build-ValueTypeXml -typeStr $parsed.type -indent "$i`t`t")
|
||||
$lines += "$i`t</valueType>"
|
||||
}
|
||||
|
||||
# Defense in depth: re-emit OuterXml of unknown children (e.g. <editFormat>,
|
||||
# <appearance>, custom extensions) that Read-FieldProperties captured.
|
||||
if ($parsed._unknownChildren) {
|
||||
foreach ($raw in $parsed._unknownChildren) {
|
||||
$lines += "$i`t" + $raw
|
||||
}
|
||||
}
|
||||
|
||||
$lines += "$i</field>"
|
||||
return $lines -join "`r`n"
|
||||
return $lines -join "`n"
|
||||
}
|
||||
|
||||
function Build-TotalFragment {
|
||||
@@ -872,7 +944,7 @@ function Build-TotalFragment {
|
||||
$lines += "$i`t<dataPath>$(Esc-Xml $parsed.dataPath)</dataPath>"
|
||||
$lines += "$i`t<expression>$(Esc-Xml $parsed.expression)</expression>"
|
||||
$lines += "$i</totalField>"
|
||||
return $lines -join "`r`n"
|
||||
return $lines -join "`n"
|
||||
}
|
||||
|
||||
function Build-CalcFieldFragment {
|
||||
@@ -899,7 +971,7 @@ function Build-CalcFieldFragment {
|
||||
}
|
||||
|
||||
$lines += "$i</calculatedField>"
|
||||
return $lines -join "`r`n"
|
||||
return $lines -join "`n"
|
||||
}
|
||||
|
||||
function Build-ParamValueXml {
|
||||
@@ -1006,7 +1078,7 @@ function Build-ParamFragment {
|
||||
}
|
||||
|
||||
$lines += "$i</parameter>"
|
||||
$fragments += ($lines -join "`r`n")
|
||||
$fragments += ($lines -join "`n")
|
||||
|
||||
if ($parsed.autoDates) {
|
||||
$paramName = $parsed.name
|
||||
@@ -1023,7 +1095,7 @@ function Build-ParamFragment {
|
||||
$bLines += "$i`t<useRestriction>true</useRestriction>"
|
||||
$bLines += "$i`t<expression>$(Esc-Xml "&$paramName.ДатаНачала")</expression>"
|
||||
$bLines += "$i</parameter>"
|
||||
$fragments += ($bLines -join "`r`n")
|
||||
$fragments += ($bLines -join "`n")
|
||||
|
||||
$eLines = @()
|
||||
$eLines += "$i<parameter>"
|
||||
@@ -1036,7 +1108,7 @@ function Build-ParamFragment {
|
||||
$eLines += "$i`t<useRestriction>true</useRestriction>"
|
||||
$eLines += "$i`t<expression>$(Esc-Xml "&$paramName.ДатаОкончания")</expression>"
|
||||
$eLines += "$i</parameter>"
|
||||
$fragments += ($eLines -join "`r`n")
|
||||
$fragments += ($eLines -join "`n")
|
||||
}
|
||||
|
||||
return ,$fragments
|
||||
@@ -1071,7 +1143,7 @@ function Build-FilterItemFragment {
|
||||
}
|
||||
|
||||
$lines += "$i</dcsset:item>"
|
||||
return $lines -join "`r`n"
|
||||
return $lines -join "`n"
|
||||
}
|
||||
|
||||
function Build-SelectionItemFragment {
|
||||
@@ -1112,7 +1184,7 @@ function Build-SelectionItemFragment {
|
||||
$lines += "$i`t<dcsset:field>$(Esc-Xml $fieldName)</dcsset:field>"
|
||||
$lines += "$i</dcsset:item>"
|
||||
}
|
||||
return $lines -join "`r`n"
|
||||
return $lines -join "`n"
|
||||
}
|
||||
|
||||
function Build-DataParamFragment {
|
||||
@@ -1154,7 +1226,7 @@ function Build-DataParamFragment {
|
||||
}
|
||||
|
||||
$lines += "$i</dcscor:item>"
|
||||
return $lines -join "`r`n"
|
||||
return $lines -join "`n"
|
||||
}
|
||||
|
||||
function Build-OrderItemFragment {
|
||||
@@ -1170,7 +1242,7 @@ function Build-OrderItemFragment {
|
||||
$lines += "$i`t<dcsset:orderType>$($parsed.direction)</dcsset:orderType>"
|
||||
$lines += "$i</dcsset:item>"
|
||||
}
|
||||
return $lines -join "`r`n"
|
||||
return $lines -join "`n"
|
||||
}
|
||||
|
||||
function Build-DataSetLinkFragment {
|
||||
@@ -1187,7 +1259,7 @@ function Build-DataSetLinkFragment {
|
||||
$lines += "$i`t<parameter>$(Esc-Xml $parsed.parameter)</parameter>"
|
||||
}
|
||||
$lines += "$i</dataSetLink>"
|
||||
return $lines -join "`r`n"
|
||||
return $lines -join "`n"
|
||||
}
|
||||
|
||||
function Build-DataSetQueryFragment {
|
||||
@@ -1200,7 +1272,7 @@ function Build-DataSetQueryFragment {
|
||||
$lines += "$i`t<dataSource>$(Esc-Xml $parsed.dataSource)</dataSource>"
|
||||
$lines += "$i`t<query>$(Esc-Xml $parsed.query)</query>"
|
||||
$lines += "$i</dataSet>"
|
||||
return $lines -join "`r`n"
|
||||
return $lines -join "`n"
|
||||
}
|
||||
|
||||
function Build-VariantFragment {
|
||||
@@ -1226,7 +1298,7 @@ function Build-VariantFragment {
|
||||
$lines += "$i`t`t</dcsset:item>"
|
||||
$lines += "$i`t</dcsset:settings>"
|
||||
$lines += "$i</settingsVariant>"
|
||||
return $lines -join "`r`n"
|
||||
return $lines -join "`n"
|
||||
}
|
||||
|
||||
function Emit-FilterComparison {
|
||||
@@ -1308,7 +1380,7 @@ function Build-ConditionalAppearanceItemFragment {
|
||||
$lines += "$i`t</dcsset:appearance>"
|
||||
|
||||
$lines += "$i</dcsset:item>"
|
||||
return $lines -join "`r`n"
|
||||
return $lines -join "`n"
|
||||
}
|
||||
|
||||
function Build-StructureItemFragment {
|
||||
@@ -1360,7 +1432,7 @@ function Build-StructureItemFragment {
|
||||
}
|
||||
|
||||
$lines += "$i</dcsset:item>"
|
||||
return $lines -join "`r`n"
|
||||
return $lines -join "`n"
|
||||
}
|
||||
|
||||
function Build-OutputParamFragment {
|
||||
@@ -1388,7 +1460,7 @@ function Build-OutputParamFragment {
|
||||
}
|
||||
|
||||
$lines += "$i</dcscor:item>"
|
||||
return $lines -join "`r`n"
|
||||
return $lines -join "`n"
|
||||
}
|
||||
|
||||
# --- 5. XML helpers ---
|
||||
@@ -1433,7 +1505,9 @@ function Get-ChildIndent($container) {
|
||||
}
|
||||
|
||||
function Insert-BeforeElement($container, $newNode, $refNode, $childIndent) {
|
||||
$ws = $xmlDoc.CreateWhitespace("`r`n$childIndent")
|
||||
# LF line endings — 1С DCS files use LF consistently; CRLF causes idempotency
|
||||
# leaks when modify-* removes one whitespace and inserts a different-style one.
|
||||
$ws = $xmlDoc.CreateWhitespace("`n$childIndent")
|
||||
if ($refNode) {
|
||||
$container.InsertBefore($ws, $refNode) | Out-Null
|
||||
$container.InsertBefore($newNode, $ws) | Out-Null
|
||||
@@ -1446,7 +1520,7 @@ function Insert-BeforeElement($container, $newNode, $refNode, $childIndent) {
|
||||
$container.AppendChild($ws) | Out-Null
|
||||
$container.AppendChild($newNode) | Out-Null
|
||||
$parentIndent = if ($childIndent.Length -gt 1) { $childIndent.Substring(0, $childIndent.Length - 1) } else { "" }
|
||||
$closeWs = $xmlDoc.CreateWhitespace("`r`n$parentIndent")
|
||||
$closeWs = $xmlDoc.CreateWhitespace("`n$parentIndent")
|
||||
$container.AppendChild($closeWs) | Out-Null
|
||||
}
|
||||
}
|
||||
@@ -1717,6 +1791,18 @@ function Get-ContainerChildIndent($container) {
|
||||
|
||||
# --- 6. Load XML ---
|
||||
|
||||
# Capture raw original BEFORE DOM parse — needed at save time to:
|
||||
# (a) restore exact root <DataCompositionSchema xmlns=...> opening tag (DOM serializer
|
||||
# collapses multi-line xmlns into a single line);
|
||||
# (b) detect NO-OP via byte-equality as an extra safety net.
|
||||
$script:RawOriginal = [System.IO.File]::ReadAllText($resolvedPath, [System.Text.Encoding]::UTF8)
|
||||
$rootOpenMatch = [regex]::Match($script:RawOriginal, '<DataCompositionSchema\b[^>]*>')
|
||||
if ($rootOpenMatch.Success) { $script:RawRootOpening = $rootOpenMatch.Value } else { $script:RawRootOpening = $null }
|
||||
|
||||
# Detect line ending convention so save can normalize back to whatever the source used.
|
||||
# 1С Designer writes CRLF on Windows; LF-edited files should stay LF.
|
||||
$script:LineEnding = if ($script:RawOriginal.Contains("`r`n")) { "`r`n" } else { "`n" }
|
||||
|
||||
$xmlDoc = New-Object System.Xml.XmlDocument
|
||||
$xmlDoc.PreserveWhitespace = $true
|
||||
$xmlDoc.Load($resolvedPath)
|
||||
@@ -1767,7 +1853,7 @@ switch ($Operation) {
|
||||
Insert-BeforeElement $dsNode $node $refNode $childIndent
|
||||
}
|
||||
|
||||
Write-Host "[OK] Field `"$($parsed.dataPath)`" added to dataset `"$dsName`""
|
||||
$script:Dirty = $true; Write-Host "[OK] Field `"$($parsed.dataPath)`" added to dataset `"$dsName`""
|
||||
|
||||
if (-not $NoSelection) {
|
||||
$settings = Resolve-VariantSettings
|
||||
@@ -1783,7 +1869,7 @@ switch ($Operation) {
|
||||
foreach ($node in $selNodes) {
|
||||
Insert-BeforeElement $selection $node $null $selIndent
|
||||
}
|
||||
Write-Host "[OK] Field `"$($parsed.dataPath)`" added to selection of variant `"$varName`""
|
||||
$script:Dirty = $true; Write-Host "[OK] Field `"$($parsed.dataPath)`" added to selection of variant `"$varName`""
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1819,7 +1905,7 @@ switch ($Operation) {
|
||||
Insert-BeforeElement $root $node $refNode $childIndent
|
||||
}
|
||||
|
||||
Write-Host "[OK] TotalField `"$($parsed.dataPath)`" = $($parsed.expression) added"
|
||||
$script:Dirty = $true; Write-Host "[OK] TotalField `"$($parsed.dataPath)`" = $($parsed.expression) added"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1853,7 +1939,7 @@ switch ($Operation) {
|
||||
Insert-BeforeElement $root $node $refNode $childIndent
|
||||
}
|
||||
|
||||
Write-Host "[OK] CalculatedField `"$($parsed.dataPath)`" = $($parsed.expression) added"
|
||||
$script:Dirty = $true; Write-Host "[OK] CalculatedField `"$($parsed.dataPath)`" = $($parsed.expression) added"
|
||||
|
||||
if (-not $NoSelection) {
|
||||
$settings = Resolve-VariantSettings
|
||||
@@ -1869,7 +1955,7 @@ switch ($Operation) {
|
||||
foreach ($node in $selNodes) {
|
||||
Insert-BeforeElement $selection $node $null $selIndent
|
||||
}
|
||||
Write-Host "[OK] Field `"$($parsed.dataPath)`" added to selection of variant `"$varName`""
|
||||
$script:Dirty = $true; Write-Host "[OK] Field `"$($parsed.dataPath)`" added to selection of variant `"$varName`""
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1907,9 +1993,9 @@ switch ($Operation) {
|
||||
}
|
||||
}
|
||||
|
||||
Write-Host "[OK] Parameter `"$($parsed.name)`" added"
|
||||
$script:Dirty = $true; Write-Host "[OK] Parameter `"$($parsed.name)`" added"
|
||||
if ($parsed.autoDates) {
|
||||
Write-Host "[OK] Auto-parameters `"ДатаНачала`", `"ДатаОкончания`" added"
|
||||
$script:Dirty = $true; Write-Host "[OK] Auto-parameters `"ДатаНачала`", `"ДатаОкончания`" added"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1951,9 +2037,23 @@ switch ($Operation) {
|
||||
$existingTitle = $ch; break
|
||||
}
|
||||
}
|
||||
# If the existing title has multiple <v8:item> (multi-language: ru + en + …),
|
||||
# patch only the ru <v8:content> via raw-string surgery to preserve other langs.
|
||||
# Otherwise rebuild as ru-only fragment.
|
||||
$titleFrag = $null
|
||||
if ($existingTitle) {
|
||||
$rawTitle = $existingTitle.OuterXml
|
||||
$rawTitle = [regex]::Replace($rawTitle, ' xmlns(?::\w+)?="[^"]*"', '')
|
||||
# Count <v8:item> occurrences — if >1, treat as multi-lang.
|
||||
$itemCount = ([regex]::Matches($rawTitle, '<v8:item>')).Count
|
||||
if ($itemCount -gt 1) {
|
||||
$titleFrag = $childIndent + (Patch-MLTextRu $rawTitle $titleVal $childIndent)
|
||||
}
|
||||
Remove-NodeWithWhitespace $existingTitle
|
||||
}
|
||||
if (-not $titleFrag) {
|
||||
$titleFrag = Build-MLTextXml -tag "title" -text $titleVal -indent $childIndent
|
||||
}
|
||||
# Insert before first of (valueType, value, useRestriction, expression, availableAsField, ...)
|
||||
$titleRef = $null
|
||||
foreach ($ch in $paramEl.ChildNodes) {
|
||||
@@ -1961,12 +2061,11 @@ switch ($Operation) {
|
||||
$titleRef = $ch; break
|
||||
}
|
||||
}
|
||||
$titleFrag = Build-MLTextXml -tag "title" -text $titleVal -indent $childIndent
|
||||
$titleNodes = Import-Fragment $xmlDoc $titleFrag
|
||||
foreach ($node in $titleNodes) {
|
||||
Insert-BeforeElement $paramEl $node $titleRef $childIndent
|
||||
}
|
||||
Write-Host "[OK] Parameter `"$paramName`": title set to `"$titleVal`""
|
||||
$script:Dirty = $true; Write-Host "[OK] Parameter `"$paramName`": title set to `"$titleVal`""
|
||||
}
|
||||
|
||||
# Separate availableValue=... from simple kv pairs
|
||||
@@ -2009,7 +2108,7 @@ switch ($Operation) {
|
||||
}
|
||||
}
|
||||
$valueLines = Build-ParamValueXml -type $declaredType -value $value -indent $childIndent
|
||||
$fragXml = $valueLines -join "`r`n"
|
||||
$fragXml = $valueLines -join "`n"
|
||||
|
||||
$wasExisting = ($null -ne $existing)
|
||||
if ($existing) {
|
||||
@@ -2033,10 +2132,10 @@ switch ($Operation) {
|
||||
Insert-BeforeElement $paramEl $node $refNode $childIndent
|
||||
}
|
||||
$verb = if ($wasExisting) { "updated" } else { "added" }
|
||||
Write-Host "[OK] Parameter `"$paramName`": value $verb to $value"
|
||||
$script:Dirty = $true; Write-Host "[OK] Parameter `"$paramName`": value $verb to $value"
|
||||
} elseif ($existing) {
|
||||
$existing.InnerText = $value
|
||||
Write-Host "[OK] Parameter `"$paramName`": $key updated to $value"
|
||||
$script:Dirty = $true; Write-Host "[OK] Parameter `"$paramName`": $key updated to $value"
|
||||
} else {
|
||||
# Schema order: ...value, useRestriction, availableValue*, denyIncompleteValues, use
|
||||
$refNode = $null
|
||||
@@ -2052,7 +2151,7 @@ switch ($Operation) {
|
||||
foreach ($node in $nodes) {
|
||||
Insert-BeforeElement $paramEl $node $refNode $childIndent
|
||||
}
|
||||
Write-Host "[OK] Parameter `"$paramName`": $key=$value added"
|
||||
$script:Dirty = $true; Write-Host "[OK] Parameter `"$paramName`": $key=$value added"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2095,13 +2194,13 @@ switch ($Operation) {
|
||||
}
|
||||
foreach ($av in $avItems) {
|
||||
$avLines = Build-AvailableValueFragment -item $av -declaredType $declaredType -indent $childIndent
|
||||
$fragXml = $avLines -join "`r`n"
|
||||
$fragXml = $avLines -join "`n"
|
||||
$nodes = Import-Fragment $xmlDoc $fragXml
|
||||
foreach ($node in $nodes) {
|
||||
Insert-BeforeElement $paramEl $node $refNode $childIndent
|
||||
}
|
||||
}
|
||||
Write-Host "[OK] Parameter `"$paramName`": availableValue set to $($avItems.Count) item(s)"
|
||||
$script:Dirty = $true; Write-Host "[OK] Parameter `"$paramName`": availableValue set to $($avItems.Count) item(s)"
|
||||
}
|
||||
|
||||
# Process @hidden / @always flags (idempotent)
|
||||
@@ -2138,7 +2237,7 @@ switch ($Operation) {
|
||||
foreach ($node in $nodes) { Insert-BeforeElement $paramEl $node $refNode $childIndent }
|
||||
}
|
||||
|
||||
Write-Host "[OK] Parameter `"$paramName`": @hidden applied"
|
||||
$script:Dirty = $true; Write-Host "[OK] Parameter `"$paramName`": @hidden applied"
|
||||
}
|
||||
|
||||
if ($flagAlways) {
|
||||
@@ -2152,7 +2251,7 @@ switch ($Operation) {
|
||||
$nodes = Import-Fragment $xmlDoc "$childIndent<use>Always</use>"
|
||||
foreach ($node in $nodes) { Insert-BeforeElement $paramEl $node $null $childIndent }
|
||||
}
|
||||
Write-Host "[OK] Parameter `"$paramName`": @always applied"
|
||||
$script:Dirty = $true; Write-Host "[OK] Parameter `"$paramName`": @always applied"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2230,7 +2329,7 @@ switch ($Operation) {
|
||||
}
|
||||
}
|
||||
|
||||
Write-Host "[OK] Parameter renamed: `"$oldName`" => `"$newName`" (expressions updated: $exprUpdated, dataParameters updated: $dpUpdated)"
|
||||
$script:Dirty = $true; Write-Host "[OK] Parameter renamed: `"$oldName`" => `"$newName`" (expressions updated: $exprUpdated, dataParameters updated: $dpUpdated)"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2307,7 +2406,7 @@ switch ($Operation) {
|
||||
Insert-BeforeElement $root $pe $anchor $childIndent
|
||||
}
|
||||
|
||||
Write-Host "[OK] Parameters reordered ($($allParams.Count) total, $($order.Count) explicit)"
|
||||
$script:Dirty = $true; Write-Host "[OK] Parameters reordered ($($allParams.Count) total, $($order.Count) explicit)"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2327,7 +2426,7 @@ switch ($Operation) {
|
||||
Insert-BeforeElement $filterEl $node $null $filterIndent
|
||||
}
|
||||
|
||||
Write-Host "[OK] Filter `"$($parsed.field) $($parsed.op)`" added to variant `"$varName`""
|
||||
$script:Dirty = $true; Write-Host "[OK] Filter `"$($parsed.field) $($parsed.op)`" added to variant `"$varName`""
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2347,7 +2446,7 @@ switch ($Operation) {
|
||||
Insert-BeforeElement $dpEl $node $null $dpIndent
|
||||
}
|
||||
|
||||
Write-Host "[OK] DataParameter `"$($parsed.parameter)`" added to variant `"$varName`""
|
||||
$script:Dirty = $true; Write-Host "[OK] DataParameter `"$($parsed.parameter)`" added to variant `"$varName`""
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2389,7 +2488,7 @@ switch ($Operation) {
|
||||
}
|
||||
|
||||
$desc = if ($parsed.field -eq "Auto") { "Auto" } else { "$($parsed.field) $($parsed.direction)" }
|
||||
Write-Host "[OK] Order `"$desc`" added to variant `"$varName`""
|
||||
$script:Dirty = $true; Write-Host "[OK] Order `"$desc`" added to variant `"$varName`""
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2452,7 +2551,7 @@ switch ($Operation) {
|
||||
}
|
||||
|
||||
$target = if ($groupName) { "group `"$groupName`"" } else { "variant `"$varName`"" }
|
||||
Write-Host "[OK] Selection `"$fieldName`" added to $target"
|
||||
$script:Dirty = $true; Write-Host "[OK] Selection `"$fieldName`" added to $target"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2469,7 +2568,7 @@ switch ($Operation) {
|
||||
# InnerText setter handles XML escaping automatically
|
||||
$queryEl.InnerText = Resolve-QueryValue $Value $script:queryBaseDir
|
||||
|
||||
Write-Host "[OK] Query replaced in dataset `"$dsName`""
|
||||
$script:Dirty = $true; Write-Host "[OK] Query replaced in dataset `"$dsName`""
|
||||
}
|
||||
|
||||
"patch-query" {
|
||||
@@ -2510,7 +2609,7 @@ switch ($Operation) {
|
||||
|
||||
$queryEl.InnerText = $queryText.Replace($oldStr, $newStr)
|
||||
$suffix = if ($once) { " (1 occurrence)" } else { " ($count occurrence(s))" }
|
||||
Write-Host "[OK] Query patched in dataset `"$dsName`": replaced '$oldStr'$suffix"
|
||||
$script:Dirty = $true; Write-Host "[OK] Query patched in dataset `"$dsName`": replaced '$oldStr'$suffix"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2528,9 +2627,9 @@ switch ($Operation) {
|
||||
$existingParam = Find-ElementByChildValue $outputEl "item" "parameter" $parsed.key $corNs
|
||||
if ($existingParam) {
|
||||
Remove-NodeWithWhitespace $existingParam
|
||||
Write-Host "[OK] Replaced outputParameter `"$($parsed.key)`" in variant `"$varName`""
|
||||
$script:Dirty = $true; Write-Host "[OK] Replaced outputParameter `"$($parsed.key)`" in variant `"$varName`""
|
||||
} else {
|
||||
Write-Host "[OK] OutputParameter `"$($parsed.key)`" added to variant `"$varName`""
|
||||
$script:Dirty = $true; Write-Host "[OK] OutputParameter `"$($parsed.key)`" added to variant `"$varName`""
|
||||
}
|
||||
|
||||
$fragXml = Build-OutputParamFragment -parsed $parsed -indent $outputIndent
|
||||
@@ -2572,7 +2671,7 @@ switch ($Operation) {
|
||||
}
|
||||
}
|
||||
|
||||
Write-Host "[OK] Structure set in variant `"$varName`": $Value"
|
||||
$script:Dirty = $true; Write-Host "[OK] Structure set in variant `"$varName`": $Value"
|
||||
}
|
||||
|
||||
"modify-structure" {
|
||||
@@ -2659,7 +2758,7 @@ switch ($Operation) {
|
||||
$lines += "$itemIndent`t<dcsset:periodAdditionBegin xsi:type=`"xs:dateTime`">0001-01-01T00:00:00</dcsset:periodAdditionBegin>"
|
||||
$lines += "$itemIndent`t<dcsset:periodAdditionEnd xsi:type=`"xs:dateTime`">0001-01-01T00:00:00</dcsset:periodAdditionEnd>"
|
||||
$lines += "$itemIndent</dcsset:item>"
|
||||
$fragXml = $lines -join "`r`n"
|
||||
$fragXml = $lines -join "`n"
|
||||
$nodes = Import-Fragment $xmlDoc $fragXml
|
||||
foreach ($node in $nodes) {
|
||||
Insert-BeforeElement $giEl $node $null $itemIndent
|
||||
@@ -2667,7 +2766,7 @@ switch ($Operation) {
|
||||
}
|
||||
|
||||
$desc = if ($t.groupBy.Count -eq 0) { "details" } else { $t.groupBy -join ', ' }
|
||||
Write-Host "[OK] Group `"$($t.name)`" groupItems updated: $desc"
|
||||
$script:Dirty = $true; Write-Host "[OK] Group `"$($t.name)`" groupItems updated: $desc"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2697,7 +2796,7 @@ switch ($Operation) {
|
||||
|
||||
$desc = "$($parsed.source) > $($parsed.dest) on $($parsed.sourceExpr) = $($parsed.destExpr)"
|
||||
if ($parsed.parameter) { $desc += " [param $($parsed.parameter)]" }
|
||||
Write-Host "[OK] DataSetLink `"$desc`" added"
|
||||
$script:Dirty = $true; Write-Host "[OK] DataSetLink `"$desc`" added"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2749,7 +2848,7 @@ switch ($Operation) {
|
||||
Insert-BeforeElement $root $node $refNode $childIndent
|
||||
}
|
||||
|
||||
Write-Host "[OK] DataSet `"$($parsed.name)`" added (dataSource=$dsSourceName)"
|
||||
$script:Dirty = $true; Write-Host "[OK] DataSet `"$($parsed.name)`" added (dataSource=$dsSourceName)"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2795,7 +2894,7 @@ switch ($Operation) {
|
||||
Insert-BeforeElement $root $node $refNode $childIndent
|
||||
}
|
||||
|
||||
Write-Host "[OK] Variant `"$($parsed.name)`" [`"$($parsed.presentation)`"] added"
|
||||
$script:Dirty = $true; Write-Host "[OK] Variant `"$($parsed.name)`" [`"$($parsed.presentation)`"] added"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2818,7 +2917,7 @@ switch ($Operation) {
|
||||
$desc = "$($parsed.param) = $($parsed.value)"
|
||||
if ($parsed.filter) { $desc += " when $($parsed.filter.field) $($parsed.filter.op)" }
|
||||
if ($parsed.fields -and $parsed.fields.Count -gt 0) { $desc += " for $($parsed.fields -join ', ')" }
|
||||
Write-Host "[OK] ConditionalAppearance `"$desc`" added to variant `"$varName`""
|
||||
$script:Dirty = $true; Write-Host "[OK] ConditionalAppearance `"$desc`" added to variant `"$varName`""
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2828,7 +2927,7 @@ switch ($Operation) {
|
||||
$selection = Find-FirstElement $settings @("selection") $setNs
|
||||
if ($selection) {
|
||||
Clear-ContainerChildren $selection
|
||||
Write-Host "[OK] Selection cleared in variant `"$varName`""
|
||||
$script:Dirty = $true; Write-Host "[OK] Selection cleared in variant `"$varName`""
|
||||
} else {
|
||||
Write-Host "[INFO] No selection section in variant `"$varName`""
|
||||
}
|
||||
@@ -2840,7 +2939,7 @@ switch ($Operation) {
|
||||
$orderEl = Find-FirstElement $settings @("order") $setNs
|
||||
if ($orderEl) {
|
||||
Clear-ContainerChildren $orderEl
|
||||
Write-Host "[OK] Order cleared in variant `"$varName`""
|
||||
$script:Dirty = $true; Write-Host "[OK] Order cleared in variant `"$varName`""
|
||||
} else {
|
||||
Write-Host "[INFO] No order section in variant `"$varName`""
|
||||
}
|
||||
@@ -2852,7 +2951,7 @@ switch ($Operation) {
|
||||
$filterEl = Find-FirstElement $settings @("filter") $setNs
|
||||
if ($filterEl) {
|
||||
Clear-ContainerChildren $filterEl
|
||||
Write-Host "[OK] Filter cleared in variant `"$varName`""
|
||||
$script:Dirty = $true; Write-Host "[OK] Filter cleared in variant `"$varName`""
|
||||
} else {
|
||||
Write-Host "[INFO] No filter section in variant `"$varName`""
|
||||
}
|
||||
@@ -2864,7 +2963,7 @@ switch ($Operation) {
|
||||
$caEl = Find-FirstElement $settings @("conditionalAppearance") $setNs
|
||||
if ($caEl) {
|
||||
Clear-ContainerChildren $caEl
|
||||
Write-Host "[OK] ConditionalAppearance cleared in variant `"$varName`""
|
||||
$script:Dirty = $true; Write-Host "[OK] ConditionalAppearance cleared in variant `"$varName`""
|
||||
} else {
|
||||
Write-Host "[INFO] No conditionalAppearance section in variant `"$varName`""
|
||||
}
|
||||
@@ -2927,7 +3026,7 @@ switch ($Operation) {
|
||||
Set-OrCreateChildElement $filterItem "userSettingID" $setNs $uid $itemIndent
|
||||
}
|
||||
|
||||
Write-Host "[OK] Filter `"$($parsed.field)`" modified in variant `"$varName`""
|
||||
$script:Dirty = $true; Write-Host "[OK] Filter `"$($parsed.field)`" modified in variant `"$varName`""
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2980,7 +3079,7 @@ switch ($Operation) {
|
||||
} else {
|
||||
$valLines += "$itemIndent<dcscor:value xsi:type=`"xs:string`">$(Esc-Xml "$($parsed.value)")</dcscor:value>"
|
||||
}
|
||||
$valXml = $valLines -join "`r`n"
|
||||
$valXml = $valLines -join "`n"
|
||||
$valNodes = Import-Fragment $xmlDoc $valXml
|
||||
foreach ($node in $valNodes) {
|
||||
Insert-BeforeElement $dpItem $node $null $itemIndent
|
||||
@@ -3014,7 +3113,7 @@ switch ($Operation) {
|
||||
Set-OrCreateChildElement $dpItem "userSettingID" $setNs $uid $itemIndent
|
||||
}
|
||||
|
||||
Write-Host "[OK] DataParameter `"$($parsed.parameter)`" modified in variant `"$varName`""
|
||||
$script:Dirty = $true; Write-Host "[OK] DataParameter `"$($parsed.parameter)`" modified in variant `"$varName`""
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3044,6 +3143,14 @@ switch ($Operation) {
|
||||
type = if ($parsed.type) { $parsed.type } else { $existing.type }
|
||||
roles = if ($parsed.roles -and $parsed.roles.Count -gt 0) { $parsed.roles } else { $existing.roles }
|
||||
restrict = if ($parsed.restrict -and $parsed.restrict.Count -gt 0) { $parsed.restrict } else { $existing.restrict }
|
||||
# Preserve raw <valueType> only when user did NOT override type via shorthand —
|
||||
# otherwise the override path rebuilds valueType from $parsed.type.
|
||||
rawValueType = if ($parsed.type) { $null } else { $existing._rawValueType }
|
||||
# Preserve raw multi-lang title; pass existing ru content for change detection.
|
||||
_rawTitle = $existing._rawTitle
|
||||
_existingTitleRu = $existing.title
|
||||
# Pass-through unknown children (e.g. <editFormat>, <appearance>, custom extensions).
|
||||
_unknownChildren = $existing._unknownChildren
|
||||
}
|
||||
|
||||
# Remember position (NextSibling after whitespace)
|
||||
@@ -3065,7 +3172,7 @@ switch ($Operation) {
|
||||
Insert-BeforeElement $dsNode $node $nextSib $childIndent
|
||||
}
|
||||
|
||||
Write-Host "[OK] Field `"$fieldName`" modified in dataset `"$dsName`""
|
||||
$script:Dirty = $true; Write-Host "[OK] Field `"$fieldName`" modified in dataset `"$dsName`""
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3103,16 +3210,32 @@ switch ($Operation) {
|
||||
|
||||
$fieldIndent = Get-ChildIndent $fieldEl
|
||||
|
||||
# Remove existing <role>
|
||||
# Remove existing <role> — but first capture OuterXml of any sub-children that
|
||||
# Build-RoleXml won't re-emit (e.g. <dcscom:addition>, <dcscom:groupFields>,
|
||||
# custom extension elements). Preserved across rebuild.
|
||||
$oldRole = $null
|
||||
foreach ($ch in $fieldEl.ChildNodes) {
|
||||
if ($ch.NodeType -eq 'Element' -and $ch.LocalName -eq 'role' -and $ch.NamespaceURI -eq $schNs) { $oldRole = $ch; break }
|
||||
}
|
||||
if ($oldRole) { Remove-NodeWithWhitespace $oldRole }
|
||||
$knownRoleChildren = @('periodNumber','periodType','dimension','ignoreNullsInGroups','balance','account','accountTypeExpression','additionType','addition')
|
||||
$preservedRoleChildren = @()
|
||||
if ($oldRole) {
|
||||
foreach ($gc in $oldRole.ChildNodes) {
|
||||
if ($gc.NodeType -ne 'Element') { continue }
|
||||
if ($knownRoleChildren -contains $gc.LocalName) { continue }
|
||||
# kv keys override the same-named sub-element on rebuild — don't preserve
|
||||
# what the user explicitly set.
|
||||
if ($kv.Contains($gc.LocalName)) { continue }
|
||||
$raw = $gc.OuterXml
|
||||
$raw = [regex]::Replace($raw, ' xmlns(?::\w+)?="[^"]*"', '')
|
||||
$preservedRoleChildren += $raw
|
||||
}
|
||||
Remove-NodeWithWhitespace $oldRole
|
||||
}
|
||||
|
||||
# Empty spec — remove only
|
||||
if ($flags.Count -eq 0 -and $kv.Count -eq 0) {
|
||||
Write-Host "[OK] Field `"$dataPath`" role cleared"
|
||||
$script:Dirty = $true; Write-Host "[OK] Field `"$dataPath`" role cleared"
|
||||
continue
|
||||
}
|
||||
|
||||
@@ -3130,8 +3253,11 @@ switch ($Operation) {
|
||||
foreach ($k in $kv.Keys) {
|
||||
$lines += "$fieldIndent`t<dcscom:$k>$(Esc-Xml $kv[$k])</dcscom:$k>"
|
||||
}
|
||||
foreach ($raw in $preservedRoleChildren) {
|
||||
$lines += "$fieldIndent`t" + $raw
|
||||
}
|
||||
$lines += "$fieldIndent</role>"
|
||||
$fragXml = $lines -join "`r`n"
|
||||
$fragXml = $lines -join "`n"
|
||||
|
||||
# Insert before <valueType>, else before <inputParameters>, else at end
|
||||
$refNode = $null
|
||||
@@ -3146,7 +3272,7 @@ switch ($Operation) {
|
||||
$desc = @()
|
||||
if ($flags.Count -gt 0) { $desc += ($flags | ForEach-Object { "@$_" }) -join ' ' }
|
||||
if ($kv.Count -gt 0) { $desc += ($kv.Keys | ForEach-Object { "$_=$($kv[$_])" }) -join ' ' }
|
||||
Write-Host "[OK] Field `"$dataPath`" role set: $($desc -join ' ')"
|
||||
$script:Dirty = $true; Write-Host "[OK] Field `"$dataPath`" role set: $($desc -join ' ')"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3164,7 +3290,7 @@ switch ($Operation) {
|
||||
}
|
||||
|
||||
Remove-NodeWithWhitespace $fieldEl
|
||||
Write-Host "[OK] Field `"$fieldName`" removed from dataset `"$dsName`""
|
||||
$script:Dirty = $true; Write-Host "[OK] Field `"$fieldName`" removed from dataset `"$dsName`""
|
||||
|
||||
# Also remove from selection in variant
|
||||
try {
|
||||
@@ -3175,7 +3301,7 @@ switch ($Operation) {
|
||||
$selItem = Find-ElementByChildValue $selection "item" "field" $fieldName $setNs
|
||||
if ($selItem) {
|
||||
Remove-NodeWithWhitespace $selItem
|
||||
Write-Host "[OK] Field `"$fieldName`" removed from selection of variant `"$varName`""
|
||||
$script:Dirty = $true; Write-Host "[OK] Field `"$fieldName`" removed from selection of variant `"$varName`""
|
||||
}
|
||||
}
|
||||
} catch {
|
||||
@@ -3196,7 +3322,7 @@ switch ($Operation) {
|
||||
}
|
||||
|
||||
Remove-NodeWithWhitespace $totalEl
|
||||
Write-Host "[OK] TotalField `"$dataPath`" removed"
|
||||
$script:Dirty = $true; Write-Host "[OK] TotalField `"$dataPath`" removed"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3212,7 +3338,7 @@ switch ($Operation) {
|
||||
}
|
||||
|
||||
Remove-NodeWithWhitespace $calcEl
|
||||
Write-Host "[OK] CalculatedField `"$dataPath`" removed"
|
||||
$script:Dirty = $true; Write-Host "[OK] CalculatedField `"$dataPath`" removed"
|
||||
|
||||
# Also remove from selection
|
||||
try {
|
||||
@@ -3223,7 +3349,7 @@ switch ($Operation) {
|
||||
$selItem = Find-ElementByChildValue $selection "item" "field" $dataPath $setNs
|
||||
if ($selItem) {
|
||||
Remove-NodeWithWhitespace $selItem
|
||||
Write-Host "[OK] Field `"$dataPath`" removed from selection of variant `"$varName`""
|
||||
$script:Dirty = $true; Write-Host "[OK] Field `"$dataPath`" removed from selection of variant `"$varName`""
|
||||
}
|
||||
}
|
||||
} catch { }
|
||||
@@ -3242,7 +3368,7 @@ switch ($Operation) {
|
||||
}
|
||||
|
||||
Remove-NodeWithWhitespace $paramEl
|
||||
Write-Host "[OK] Parameter `"$paramName`" removed"
|
||||
$script:Dirty = $true; Write-Host "[OK] Parameter `"$paramName`" removed"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3266,7 +3392,7 @@ switch ($Operation) {
|
||||
}
|
||||
|
||||
Remove-NodeWithWhitespace $filterItem
|
||||
Write-Host "[OK] Filter for `"$fieldName`" removed from variant `"$varName`""
|
||||
$script:Dirty = $true; Write-Host "[OK] Filter for `"$fieldName`" removed from variant `"$varName`""
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3400,7 +3526,7 @@ switch ($Operation) {
|
||||
$searchStart = $cellEnd + 1
|
||||
}
|
||||
|
||||
Write-Host "[OK] $drillName → $tplName (param + $cellCount cell(s))"
|
||||
$script:Dirty = $true; Write-Host "[OK] $drillName → $tplName (param + $cellCount cell(s))"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3415,15 +3541,40 @@ switch ($Operation) {
|
||||
# Write directly — skip DOM save
|
||||
$enc = New-Object System.Text.UTF8Encoding($true)
|
||||
[System.IO.File]::WriteAllText($resolvedPath, $rawText, $enc)
|
||||
Write-Host "[OK] Saved $resolvedPath"
|
||||
$script:Dirty = $true; Write-Host "[OK] Saved $resolvedPath"
|
||||
exit 0
|
||||
}
|
||||
}
|
||||
|
||||
# --- 9. Save ---
|
||||
|
||||
if (-not $script:Dirty) {
|
||||
Write-Host "[INFO] No changes -- file untouched"
|
||||
exit 0
|
||||
}
|
||||
|
||||
$content = $xmlDoc.OuterXml
|
||||
$content = $content -replace '(?<=<\?xml[^?]*encoding=")utf-8(?=")', 'UTF-8'
|
||||
|
||||
# Format-preserve post-processing:
|
||||
# (1) restore the original raw <DataCompositionSchema ...> opening tag — DOM collapses
|
||||
# multi-line xmlns declarations into one line.
|
||||
if ($script:RawRootOpening) {
|
||||
$content = [regex]::Replace($content, '<DataCompositionSchema\b[^>]*>', { param($m) $script:RawRootOpening })
|
||||
}
|
||||
|
||||
# (2) normalize self-closing tags: `.NET XmlDocument` adds a space before `/>`
|
||||
# (`<foo bar="x" />`) but 1C-Designer writes `<foo bar="x"/>`. Strip the space.
|
||||
$content = [regex]::Replace($content, '(?<=\S) />', '/>')
|
||||
|
||||
# (3) normalize line endings to match source — operations may mix LF (from new
|
||||
# fragments) with whatever the source used (CRLF on Windows, LF on Linux/git).
|
||||
if ($script:LineEnding -eq "`r`n") {
|
||||
$content = $content -replace '(?<!\r)\n', "`r`n"
|
||||
} else {
|
||||
$content = $content -replace "`r`n", "`n"
|
||||
}
|
||||
|
||||
$enc = New-Object System.Text.UTF8Encoding($true)
|
||||
[System.IO.File]::WriteAllText($resolvedPath, $content, $enc)
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# skd-edit v1.18 — Atomic 1C DCS editor (Python port)
|
||||
# skd-edit v1.22 — Atomic 1C DCS editor (Python port)
|
||||
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
|
||||
import argparse
|
||||
import os
|
||||
@@ -11,6 +11,10 @@ from lxml import etree
|
||||
sys.stdout.reconfigure(encoding="utf-8")
|
||||
sys.stderr.reconfigure(encoding="utf-8")
|
||||
|
||||
# Dirty flag — set to True by every successful mutation. If still False at save time,
|
||||
# the file is left untouched (NO-OP operations like [WARN] not found don't rewrite).
|
||||
dirty = False
|
||||
|
||||
# ── arg parsing ──────────────────────────────────────────────
|
||||
|
||||
VALID_OPS = [
|
||||
@@ -76,7 +80,7 @@ def local_name(node):
|
||||
# ── helpers ──────────────────────────────────────────────────
|
||||
|
||||
def esc_xml(s):
|
||||
return s.replace('&', '&').replace('<', '<').replace('>', '>').replace('"', '"')
|
||||
return s.replace('&', '&').replace('<', '<').replace('>', '>')
|
||||
|
||||
|
||||
def resolve_query_value(val, base_dir):
|
||||
@@ -210,7 +214,8 @@ def parse_field_shorthand(s):
|
||||
|
||||
|
||||
def read_field_properties(field_el):
|
||||
props = {"dataPath": "", "field": "", "title": "", "type": "", "roles": [], "restrict": [], "_rawTypeText": ""}
|
||||
props = {"dataPath": "", "field": "", "title": "", "type": "", "roles": [], "restrict": [], "_rawTypeText": "",
|
||||
"_rawTitle": None, "_unknownChildren": []}
|
||||
|
||||
for ch in field_el:
|
||||
if not isinstance(ch.tag, str):
|
||||
@@ -221,12 +226,29 @@ def read_field_properties(field_el):
|
||||
elif ln == "field":
|
||||
props["field"] = (ch.text or "").strip()
|
||||
elif ln == "title":
|
||||
# Preserve full multi-lang title OuterXml; also extract ru content for compat.
|
||||
raw = etree.tostring(ch, encoding="unicode", with_tail=False)
|
||||
raw = re.sub(r' xmlns(?::\w+)?="[^"]*"', "", raw)
|
||||
props["_rawTitle"] = raw
|
||||
for item in ch:
|
||||
if isinstance(item.tag, str) and local_name(item) == "item":
|
||||
lang = None
|
||||
content = None
|
||||
for gc in item:
|
||||
if isinstance(gc.tag, str) and local_name(gc) == "lang":
|
||||
lang = (gc.text or "").strip()
|
||||
if isinstance(gc.tag, str) and local_name(gc) == "content":
|
||||
props["title"] = (gc.text or "").strip()
|
||||
content = (gc.text or "").strip()
|
||||
if lang == "ru" and content is not None:
|
||||
props["title"] = content
|
||||
elif ln == "valueType":
|
||||
# Preserve full <valueType> serialization so rebuild can re-emit qualifiers
|
||||
# (StringQualifiers, NumberQualifiers, DateQualifiers, …) that aren't
|
||||
# expressible via shorthand. Strip xmlns declarations that lxml re-emits when
|
||||
# serializing a sub-element (parent context already provides them).
|
||||
raw = etree.tostring(ch, encoding="unicode", with_tail=False)
|
||||
raw = re.sub(r' xmlns(?::\w+)?="[^"]*"', "", raw)
|
||||
props["_rawValueType"] = raw
|
||||
for gc in ch:
|
||||
if isinstance(gc.tag, str) and local_name(gc) == "Type":
|
||||
props["_rawTypeText"] = (gc.text or "").strip()
|
||||
@@ -246,6 +268,12 @@ def read_field_properties(field_el):
|
||||
mapped = rev_map.get(local_name(gc))
|
||||
if mapped:
|
||||
props["restrict"].append(mapped)
|
||||
else:
|
||||
# Defense in depth: preserve OuterXml of unknown children so rebuild
|
||||
# doesn't silently drop them (custom <editFormat>, <appearance>, etc.).
|
||||
raw = etree.tostring(ch, encoding="unicode", with_tail=False)
|
||||
raw = re.sub(r' xmlns(?::\w+)?="[^"]*"', "", raw)
|
||||
props["_unknownChildren"].append(raw)
|
||||
return props
|
||||
|
||||
|
||||
@@ -679,7 +707,7 @@ def build_value_type_xml(type_str, indent):
|
||||
|
||||
if type_str == "boolean":
|
||||
lines.append(f"{indent}<v8:Type>xs:boolean</v8:Type>")
|
||||
return "\r\n".join(lines)
|
||||
return "\n".join(lines)
|
||||
|
||||
m = re.match(r'^string(\((\d+)\))?$', type_str)
|
||||
if m:
|
||||
@@ -689,7 +717,7 @@ def build_value_type_xml(type_str, indent):
|
||||
lines.append(f"{indent}\t<v8:Length>{length}</v8:Length>")
|
||||
lines.append(f"{indent}\t<v8:AllowedLength>Variable</v8:AllowedLength>")
|
||||
lines.append(f"{indent}</v8:StringQualifiers>")
|
||||
return "\r\n".join(lines)
|
||||
return "\n".join(lines)
|
||||
|
||||
m = re.match(r'^decimal\((\d+),(\d+)(,nonneg)?\)$', type_str)
|
||||
if m:
|
||||
@@ -701,7 +729,7 @@ def build_value_type_xml(type_str, indent):
|
||||
lines.append(f"{indent}\t<v8:FractionDigits>{fraction}</v8:FractionDigits>")
|
||||
lines.append(f"{indent}\t<v8:AllowedSign>{sign}</v8:AllowedSign>")
|
||||
lines.append(f"{indent}</v8:NumberQualifiers>")
|
||||
return "\r\n".join(lines)
|
||||
return "\n".join(lines)
|
||||
|
||||
m = re.match(r'^(date|dateTime)$', type_str)
|
||||
if m:
|
||||
@@ -710,22 +738,22 @@ def build_value_type_xml(type_str, indent):
|
||||
lines.append(f"{indent}<v8:DateQualifiers>")
|
||||
lines.append(f"{indent}\t<v8:DateFractions>{fractions}</v8:DateFractions>")
|
||||
lines.append(f"{indent}</v8:DateQualifiers>")
|
||||
return "\r\n".join(lines)
|
||||
return "\n".join(lines)
|
||||
|
||||
if type_str == "StandardPeriod":
|
||||
lines.append(f"{indent}<v8:Type>v8:StandardPeriod</v8:Type>")
|
||||
return "\r\n".join(lines)
|
||||
return "\n".join(lines)
|
||||
|
||||
if re.match(r'^(CatalogRef|DocumentRef|EnumRef|ChartOfAccountsRef|ChartOfCharacteristicTypesRef)\.', type_str):
|
||||
lines.append(f'{indent}<v8:Type xmlns:d5p1="http://v8.1c.ru/8.1/data/enterprise/current-config">d5p1:{esc_xml(type_str)}</v8:Type>')
|
||||
return "\r\n".join(lines)
|
||||
return "\n".join(lines)
|
||||
|
||||
if "." in type_str:
|
||||
lines.append(f'{indent}<v8:Type xmlns:d5p1="http://v8.1c.ru/8.1/data/enterprise/current-config">d5p1:{esc_xml(type_str)}</v8:Type>')
|
||||
return "\r\n".join(lines)
|
||||
return "\n".join(lines)
|
||||
|
||||
lines.append(f"{indent}<v8:Type>{esc_xml(type_str)}</v8:Type>")
|
||||
return "\r\n".join(lines)
|
||||
return "\n".join(lines)
|
||||
|
||||
|
||||
def build_mltext_xml(tag, text, indent):
|
||||
@@ -737,7 +765,20 @@ def build_mltext_xml(tag, text, indent):
|
||||
f"{indent}\t</v8:item>",
|
||||
f"{indent}</{tag}>",
|
||||
]
|
||||
return "\r\n".join(lines)
|
||||
return "\n".join(lines)
|
||||
|
||||
|
||||
def patch_mltext_ru(raw_outer_xml, new_ru_text, indent):
|
||||
"""Patch the ru <v8:content> within an existing multi-lang title OuterXml,
|
||||
preserving en/uk/etc. siblings. Mirrors PS Patch-MLTextRu."""
|
||||
escaped = esc_xml(new_ru_text)
|
||||
ru_item_pat = r"(<v8:item>\s*<v8:lang>ru</v8:lang>\s*<v8:content>)[^<]*(</v8:content>\s*</v8:item>)"
|
||||
if re.search(ru_item_pat, raw_outer_xml):
|
||||
return re.sub(ru_item_pat, lambda m: m.group(1) + escaped + m.group(2), raw_outer_xml)
|
||||
prep = f"{indent}\t<v8:item>\n{indent}\t\t<v8:lang>ru</v8:lang>\n{indent}\t\t<v8:content>{escaped}</v8:content>\n{indent}\t</v8:item>"
|
||||
if "<v8:item>" in raw_outer_xml:
|
||||
return re.sub(r"(\s*)<v8:item>", lambda m: "\n" + prep + m.group(1) + "<v8:item>", raw_outer_xml, count=1)
|
||||
return re.sub(r"(<(?:\w+:)?title[^>]*>)", lambda m: m.group(1) + "\n" + prep + "\n" + indent, raw_outer_xml, count=1)
|
||||
|
||||
|
||||
def build_role_xml(roles, indent):
|
||||
@@ -751,7 +792,7 @@ def build_role_xml(roles, indent):
|
||||
else:
|
||||
lines.append(f"{indent}\t<dcscom:{role}>true</dcscom:{role}>")
|
||||
lines.append(f"{indent}</role>")
|
||||
return "\r\n".join(lines)
|
||||
return "\n".join(lines)
|
||||
|
||||
|
||||
def build_restriction_xml(restrict, indent):
|
||||
@@ -764,7 +805,7 @@ def build_restriction_xml(restrict, indent):
|
||||
if xml_name:
|
||||
lines.append(f"{indent}\t<{xml_name}>true</{xml_name}>")
|
||||
lines.append(f"{indent}</useRestriction>")
|
||||
return "\r\n".join(lines)
|
||||
return "\n".join(lines)
|
||||
|
||||
|
||||
def build_field_fragment(parsed, indent):
|
||||
@@ -773,7 +814,15 @@ def build_field_fragment(parsed, indent):
|
||||
lines.append(f"{i}\t<dataPath>{esc_xml(parsed['dataPath'])}</dataPath>")
|
||||
lines.append(f"{i}\t<field>{esc_xml(parsed['field'])}</field>")
|
||||
|
||||
if parsed.get("title"):
|
||||
# Title: prefer raw multi-lang OuterXml (preserves en/uk/etc.). When shorthand
|
||||
# provides a new ru text different from existing, patch the ru content. Otherwise
|
||||
# emit raw as-is or build ru-only from shorthand if there was no prior title.
|
||||
if parsed.get("_rawTitle"):
|
||||
if parsed.get("title") and parsed["title"] != parsed.get("_existingTitleRu"):
|
||||
lines.append(f"{i}\t" + patch_mltext_ru(parsed["_rawTitle"], parsed["title"], f"{i}\t"))
|
||||
else:
|
||||
lines.append(f"{i}\t" + parsed["_rawTitle"])
|
||||
elif parsed.get("title"):
|
||||
lines.append(build_mltext_xml("title", parsed["title"], f"{i}\t"))
|
||||
|
||||
if parsed.get("restrict"):
|
||||
@@ -783,13 +832,21 @@ def build_field_fragment(parsed, indent):
|
||||
if role_xml:
|
||||
lines.append(role_xml)
|
||||
|
||||
if parsed.get("type"):
|
||||
if parsed.get("rawValueType"):
|
||||
# Preserve original <valueType> verbatim — keeps qualifiers (StringQualifiers,
|
||||
# NumberQualifiers, DateQualifiers, …) that aren't expressible via shorthand.
|
||||
lines.append(f"{i}\t" + parsed["rawValueType"])
|
||||
elif parsed.get("type"):
|
||||
lines.append(f"{i}\t<valueType>")
|
||||
lines.append(build_value_type_xml(parsed["type"], f"{i}\t\t"))
|
||||
lines.append(f"{i}\t</valueType>")
|
||||
|
||||
# Defense in depth: re-emit OuterXml of unknown children captured by Read.
|
||||
for raw in (parsed.get("_unknownChildren") or []):
|
||||
lines.append(f"{i}\t" + raw)
|
||||
|
||||
lines.append(f"{i}</field>")
|
||||
return "\r\n".join(lines)
|
||||
return "\n".join(lines)
|
||||
|
||||
|
||||
def build_total_fragment(parsed, indent):
|
||||
@@ -800,7 +857,7 @@ def build_total_fragment(parsed, indent):
|
||||
f"{i}\t<expression>{esc_xml(parsed['expression'])}</expression>",
|
||||
f"{i}</totalField>",
|
||||
]
|
||||
return "\r\n".join(lines)
|
||||
return "\n".join(lines)
|
||||
|
||||
|
||||
def build_calc_field_fragment(parsed, indent):
|
||||
@@ -819,7 +876,7 @@ def build_calc_field_fragment(parsed, indent):
|
||||
lines.append(build_value_type_xml(parsed["type"], f"{i}\t\t"))
|
||||
lines.append(f"{i}\t</valueType>")
|
||||
lines.append(f"{i}</calculatedField>")
|
||||
return "\r\n".join(lines)
|
||||
return "\n".join(lines)
|
||||
|
||||
|
||||
def build_param_value_xml(type_str, value, indent, tag_name="value", tag_ns=""):
|
||||
@@ -893,7 +950,7 @@ def build_param_fragment(parsed, indent):
|
||||
lines.append(f"{i}\t<use>Always</use>")
|
||||
|
||||
lines.append(f"{i}</parameter>")
|
||||
fragments.append("\r\n".join(lines))
|
||||
fragments.append("\n".join(lines))
|
||||
|
||||
if parsed.get("autoDates"):
|
||||
param_name = parsed["name"]
|
||||
@@ -910,7 +967,7 @@ def build_param_fragment(parsed, indent):
|
||||
f"{i}\t<expression>{esc_xml('&' + param_name + '.\u0414\u0430\u0442\u0430\u041d\u0430\u0447\u0430\u043b\u0430')}</expression>",
|
||||
f"{i}</parameter>",
|
||||
]
|
||||
fragments.append("\r\n".join(b_lines))
|
||||
fragments.append("\n".join(b_lines))
|
||||
|
||||
e_lines = [
|
||||
f"{i}<parameter>",
|
||||
@@ -924,7 +981,7 @@ def build_param_fragment(parsed, indent):
|
||||
f"{i}\t<expression>{esc_xml('&' + param_name + '.\u0414\u0430\u0442\u0430\u041e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u044f')}</expression>",
|
||||
f"{i}</parameter>",
|
||||
]
|
||||
fragments.append("\r\n".join(e_lines))
|
||||
fragments.append("\n".join(e_lines))
|
||||
|
||||
return fragments
|
||||
|
||||
@@ -951,7 +1008,7 @@ def build_filter_item_fragment(parsed, indent):
|
||||
lines.append(f"{i}\t<dcsset:userSettingID>{esc_xml(uid)}</dcsset:userSettingID>")
|
||||
|
||||
lines.append(f"{i}</dcsset:item>")
|
||||
return "\r\n".join(lines)
|
||||
return "\n".join(lines)
|
||||
|
||||
|
||||
def build_selection_item_fragment(field_name, indent):
|
||||
@@ -982,13 +1039,13 @@ def build_selection_item_fragment(field_name, indent):
|
||||
lines.append(f"{i}\t</dcsset:item>")
|
||||
lines.append(f"{i}\t<dcsset:placement>Auto</dcsset:placement>")
|
||||
lines.append(f"{i}</dcsset:item>")
|
||||
return "\r\n".join(lines)
|
||||
return "\n".join(lines)
|
||||
lines = [
|
||||
f'{i}<dcsset:item xsi:type="dcsset:SelectedItemField">',
|
||||
f"{i}\t<dcsset:field>{esc_xml(field_name)}</dcsset:field>",
|
||||
f"{i}</dcsset:item>",
|
||||
]
|
||||
return "\r\n".join(lines)
|
||||
return "\n".join(lines)
|
||||
|
||||
|
||||
def build_data_param_fragment(parsed, indent):
|
||||
@@ -1023,7 +1080,7 @@ def build_data_param_fragment(parsed, indent):
|
||||
lines.append(f"{i}\t<dcsset:userSettingID>{esc_xml(uid)}</dcsset:userSettingID>")
|
||||
|
||||
lines.append(f"{i}</dcscor:item>")
|
||||
return "\r\n".join(lines)
|
||||
return "\n".join(lines)
|
||||
|
||||
|
||||
def build_order_item_fragment(parsed, indent):
|
||||
@@ -1036,7 +1093,7 @@ def build_order_item_fragment(parsed, indent):
|
||||
f"{i}\t<dcsset:orderType>{parsed['direction']}</dcsset:orderType>",
|
||||
f"{i}</dcsset:item>",
|
||||
]
|
||||
return "\r\n".join(lines)
|
||||
return "\n".join(lines)
|
||||
|
||||
|
||||
def build_data_set_link_fragment(parsed, indent):
|
||||
@@ -1051,7 +1108,7 @@ def build_data_set_link_fragment(parsed, indent):
|
||||
if parsed.get("parameter"):
|
||||
lines.append(f"{i}\t<parameter>{esc_xml(parsed['parameter'])}</parameter>")
|
||||
lines.append(f"{i}</dataSetLink>")
|
||||
return "\r\n".join(lines)
|
||||
return "\n".join(lines)
|
||||
|
||||
|
||||
def build_data_set_query_fragment(parsed, indent):
|
||||
@@ -1063,7 +1120,7 @@ def build_data_set_query_fragment(parsed, indent):
|
||||
f"{i}\t<query>{esc_xml(parsed['query'])}</query>",
|
||||
f"{i}</dataSet>",
|
||||
]
|
||||
return "\r\n".join(lines)
|
||||
return "\n".join(lines)
|
||||
|
||||
|
||||
def build_variant_fragment(parsed, indent):
|
||||
@@ -1088,7 +1145,7 @@ def build_variant_fragment(parsed, indent):
|
||||
f"{i}\t</dcsset:settings>",
|
||||
f"{i}</settingsVariant>",
|
||||
]
|
||||
return "\r\n".join(lines)
|
||||
return "\n".join(lines)
|
||||
|
||||
|
||||
def _emit_filter_comparison(lines, f, indent):
|
||||
@@ -1155,7 +1212,7 @@ def build_conditional_appearance_item_fragment(parsed, indent):
|
||||
lines.append(f"{i}\t</dcsset:appearance>")
|
||||
|
||||
lines.append(f"{i}</dcsset:item>")
|
||||
return "\r\n".join(lines)
|
||||
return "\n".join(lines)
|
||||
|
||||
|
||||
def build_structure_item_fragment(item, indent):
|
||||
@@ -1192,7 +1249,7 @@ def build_structure_item_fragment(item, indent):
|
||||
lines.append(build_structure_item_fragment(child, f"{i}\t"))
|
||||
|
||||
lines.append(f"{i}</dcsset:item>")
|
||||
return "\r\n".join(lines)
|
||||
return "\n".join(lines)
|
||||
|
||||
|
||||
def build_output_param_fragment(parsed, indent):
|
||||
@@ -1215,7 +1272,7 @@ def build_output_param_fragment(parsed, indent):
|
||||
lines.append(f'{i}\t<dcscor:value xsi:type="{ptype}">{esc_xml(val)}</dcscor:value>')
|
||||
|
||||
lines.append(f"{i}</dcscor:item>")
|
||||
return "\r\n".join(lines)
|
||||
return "\n".join(lines)
|
||||
|
||||
|
||||
# ── 5. XML helpers ──────────────────────────────────────────
|
||||
@@ -1492,6 +1549,18 @@ def get_container_child_indent(container):
|
||||
|
||||
# ── 6. Load XML ─────────────────────────────────────────────
|
||||
|
||||
# Capture raw original BEFORE parse — needed at save time to restore exact root
|
||||
# <DataCompositionSchema xmlns=...> opening tag (lxml's tostring() collapses multi-line
|
||||
# xmlns into one line) and to detect NO-OP via byte-equality as a safety net.
|
||||
with open(resolved_path, "rb") as _f:
|
||||
raw_original_bytes = _f.read()
|
||||
raw_original_text = raw_original_bytes.lstrip(b"\xef\xbb\xbf").decode("utf-8")
|
||||
_root_open_m = re.search(r"<DataCompositionSchema\b[^>]*>", raw_original_text, re.DOTALL)
|
||||
raw_root_opening = _root_open_m.group(0) if _root_open_m else None
|
||||
|
||||
# Detect line ending convention so save can normalize back to whatever the source used.
|
||||
line_ending = "\r\n" if "\r\n" in raw_original_text else "\n"
|
||||
|
||||
xml_parser = etree.XMLParser(remove_blank_text=False)
|
||||
tree = etree.parse(resolved_path, xml_parser)
|
||||
xml_doc = tree.getroot()
|
||||
@@ -1532,7 +1601,7 @@ if operation == "add-field":
|
||||
for node in nodes:
|
||||
insert_before_element(ds_node, node, ref_node, child_indent)
|
||||
|
||||
print(f'[OK] Field "{parsed["dataPath"]}" added to dataset "{ds_name}"')
|
||||
dirty = True; print(f'[OK] Field "{parsed["dataPath"]}" added to dataset "{ds_name}"')
|
||||
|
||||
if not no_selection:
|
||||
settings = resolve_variant_settings()
|
||||
@@ -1547,7 +1616,7 @@ if operation == "add-field":
|
||||
sel_nodes = import_fragment(xml_doc, sel_xml)
|
||||
for node in sel_nodes:
|
||||
insert_before_element(selection, node, None, sel_indent)
|
||||
print(f'[OK] Field "{parsed["dataPath"]}" added to selection of variant "{var_name}"')
|
||||
dirty = True; print(f'[OK] Field "{parsed["dataPath"]}" added to selection of variant "{var_name}"')
|
||||
|
||||
elif operation == "add-total":
|
||||
for val in values:
|
||||
@@ -1579,7 +1648,7 @@ elif operation == "add-total":
|
||||
for node in nodes:
|
||||
insert_before_element(xml_doc, node, ref_node, child_indent)
|
||||
|
||||
print(f'[OK] TotalField "{parsed["dataPath"]}" = {parsed["expression"]} added')
|
||||
dirty = True; print(f'[OK] TotalField "{parsed["dataPath"]}" = {parsed["expression"]} added')
|
||||
|
||||
elif operation == "add-calculated-field":
|
||||
for val in values:
|
||||
@@ -1610,7 +1679,7 @@ elif operation == "add-calculated-field":
|
||||
for node in nodes:
|
||||
insert_before_element(xml_doc, node, ref_node, child_indent)
|
||||
|
||||
print(f'[OK] CalculatedField "{parsed["dataPath"]}" = {parsed["expression"]} added')
|
||||
dirty = True; print(f'[OK] CalculatedField "{parsed["dataPath"]}" = {parsed["expression"]} added')
|
||||
|
||||
if not no_selection:
|
||||
settings = resolve_variant_settings()
|
||||
@@ -1625,7 +1694,7 @@ elif operation == "add-calculated-field":
|
||||
sel_nodes = import_fragment(xml_doc, sel_xml)
|
||||
for node in sel_nodes:
|
||||
insert_before_element(selection, node, None, sel_indent)
|
||||
print(f'[OK] Field "{parsed["dataPath"]}" added to selection of variant "{var_name}"')
|
||||
dirty = True; print(f'[OK] Field "{parsed["dataPath"]}" added to selection of variant "{var_name}"')
|
||||
|
||||
elif operation == "add-parameter":
|
||||
for val in values:
|
||||
@@ -1657,9 +1726,9 @@ elif operation == "add-parameter":
|
||||
for node in nodes:
|
||||
insert_before_element(xml_doc, node, ref_node, child_indent)
|
||||
|
||||
print(f'[OK] Parameter "{parsed["name"]}" added')
|
||||
dirty = True; print(f'[OK] Parameter "{parsed["name"]}" added')
|
||||
if parsed.get("autoDates"):
|
||||
print('[OK] Auto-parameters "\u0414\u0430\u0442\u0430\u041d\u0430\u0447\u0430\u043b\u0430", "\u0414\u0430\u0442\u0430\u041e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u044f" added')
|
||||
dirty = True; print('[OK] Auto-parameters "\u0414\u0430\u0442\u0430\u041d\u0430\u0447\u0430\u043b\u0430", "\u0414\u0430\u0442\u0430\u041e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u044f" added')
|
||||
|
||||
elif operation == "modify-parameter":
|
||||
for val in values:
|
||||
@@ -1693,14 +1762,22 @@ elif operation == "modify-parameter":
|
||||
# Set/replace title (must come right after <name>, before <valueType>)
|
||||
if title_val is not None:
|
||||
existing_title = next((ch for ch in param_el if isinstance(ch.tag, str) and local_name(ch) == "title"), None)
|
||||
# If existing title is multi-lang (has >1 <v8:item>), patch ru content
|
||||
# while preserving other languages. Otherwise rebuild as ru-only.
|
||||
title_frag = None
|
||||
if existing_title is not None:
|
||||
raw_title = etree.tostring(existing_title, encoding="unicode", with_tail=False)
|
||||
raw_title = re.sub(r' xmlns(?::\w+)?="[^"]*"', "", raw_title)
|
||||
if raw_title.count("<v8:item>") > 1:
|
||||
title_frag = child_indent + patch_mltext_ru(raw_title, title_val, child_indent)
|
||||
remove_node_with_whitespace(existing_title)
|
||||
if title_frag is None:
|
||||
title_frag = build_mltext_xml("title", title_val, child_indent)
|
||||
# Insert before the first child after <name>
|
||||
title_ref = next((ch for ch in param_el if isinstance(ch.tag, str) and local_name(ch) != "name"), None)
|
||||
title_frag = build_mltext_xml("title", title_val, child_indent)
|
||||
for node in import_fragment(xml_doc, title_frag):
|
||||
insert_before_element(param_el, node, title_ref, child_indent)
|
||||
print(f'[OK] Parameter "{param_name}": title set to "{title_val}"')
|
||||
dirty = True; print(f'[OK] Parameter "{param_name}": title set to "{title_val}"')
|
||||
|
||||
# Separate availableValue=... from simple kv pairs
|
||||
simple_rest = rest
|
||||
@@ -1726,7 +1803,7 @@ elif operation == "modify-parameter":
|
||||
declared_type = re.sub(r'^d\d+p\d+:', '', (tnode.text or "").strip())
|
||||
break
|
||||
value_lines = build_param_value_xml(declared_type, value, child_indent)
|
||||
frag_xml = "\r\n".join(value_lines)
|
||||
frag_xml = "\n".join(value_lines)
|
||||
was_existing = existing is not None
|
||||
if existing is not None:
|
||||
# Find next-element sibling as ref before removing
|
||||
@@ -1739,10 +1816,10 @@ elif operation == "modify-parameter":
|
||||
for node in nodes:
|
||||
insert_before_element(param_el, node, ref_node, child_indent)
|
||||
verb = "updated" if was_existing else "added"
|
||||
print(f'[OK] Parameter "{param_name}": value {verb} to {value}')
|
||||
dirty = True; print(f'[OK] Parameter "{param_name}": value {verb} to {value}')
|
||||
elif existing is not None:
|
||||
existing.text = value
|
||||
print(f'[OK] Parameter "{param_name}": {key} updated to {value}')
|
||||
dirty = True; print(f'[OK] Parameter "{param_name}": {key} updated to {value}')
|
||||
else:
|
||||
# Schema order: ...value, useRestriction, availableValue*, denyIncompleteValues, use
|
||||
ref_node = None
|
||||
@@ -1752,7 +1829,7 @@ elif operation == "modify-parameter":
|
||||
nodes = import_fragment(xml_doc, frag_xml)
|
||||
for node in nodes:
|
||||
insert_before_element(param_el, node, ref_node, child_indent)
|
||||
print(f'[OK] Parameter "{param_name}": {key}={value} added')
|
||||
dirty = True; print(f'[OK] Parameter "{param_name}": {key}={value} added')
|
||||
|
||||
# Process availableValue
|
||||
if av_part:
|
||||
@@ -1785,11 +1862,11 @@ elif operation == "modify-parameter":
|
||||
break
|
||||
for av in av_items:
|
||||
av_lines = build_available_value_fragment(av, declared_type, child_indent)
|
||||
frag_xml = "\r\n".join(av_lines)
|
||||
frag_xml = "\n".join(av_lines)
|
||||
nodes = import_fragment(xml_doc, frag_xml)
|
||||
for node in nodes:
|
||||
insert_before_element(param_el, node, ref_node, child_indent)
|
||||
print(f'[OK] Parameter "{param_name}": availableValue set to {len(av_items)} item(s)')
|
||||
dirty = True; print(f'[OK] Parameter "{param_name}": availableValue set to {len(av_items)} item(s)')
|
||||
|
||||
if flag_hidden:
|
||||
ur_el = next((ch for ch in param_el if isinstance(ch.tag, str) and local_name(ch) == "useRestriction" and etree.QName(ch.tag).namespace == SCH_NS), None)
|
||||
@@ -1810,7 +1887,7 @@ elif operation == "modify-parameter":
|
||||
for node in import_fragment(xml_doc, f"{child_indent}<availableAsField>false</availableAsField>"):
|
||||
insert_before_element(param_el, node, ref_node, child_indent)
|
||||
|
||||
print(f'[OK] Parameter "{param_name}": @hidden applied')
|
||||
dirty = True; print(f'[OK] Parameter "{param_name}": @hidden applied')
|
||||
|
||||
if flag_always:
|
||||
use_el = next((ch for ch in param_el if isinstance(ch.tag, str) and local_name(ch) == "use" and etree.QName(ch.tag).namespace == SCH_NS), None)
|
||||
@@ -1820,7 +1897,7 @@ elif operation == "modify-parameter":
|
||||
else:
|
||||
for node in import_fragment(xml_doc, f"{child_indent}<use>Always</use>"):
|
||||
insert_before_element(param_el, node, None, child_indent)
|
||||
print(f'[OK] Parameter "{param_name}": @always applied')
|
||||
dirty = True; print(f'[OK] Parameter "{param_name}": @always applied')
|
||||
|
||||
elif operation == "rename-parameter":
|
||||
root = xml_doc
|
||||
@@ -1883,7 +1960,7 @@ elif operation == "rename-parameter":
|
||||
gc.text = new_name
|
||||
dp_updated += 1
|
||||
|
||||
print(f'[OK] Parameter renamed: "{old_name}" => "{new_name}" (expressions updated: {expr_updated}, dataParameters updated: {dp_updated})')
|
||||
dirty = True; print(f'[OK] Parameter renamed: "{old_name}" => "{new_name}" (expressions updated: {expr_updated}, dataParameters updated: {dp_updated})')
|
||||
|
||||
elif operation == "reorder-parameters":
|
||||
root = xml_doc
|
||||
@@ -1940,7 +2017,7 @@ elif operation == "reorder-parameters":
|
||||
for pe in new_order:
|
||||
insert_before_element(root, pe, anchor, child_indent)
|
||||
|
||||
print(f'[OK] Parameters reordered ({len(all_params)} total, {len(order)} explicit)')
|
||||
dirty = True; print(f'[OK] Parameters reordered ({len(all_params)} total, {len(order)} explicit)')
|
||||
|
||||
elif operation == "add-filter":
|
||||
settings = resolve_variant_settings()
|
||||
@@ -1953,7 +2030,7 @@ elif operation == "add-filter":
|
||||
nodes = import_fragment(xml_doc, frag_xml)
|
||||
for node in nodes:
|
||||
insert_before_element(filter_el, node, None, filter_indent)
|
||||
print(f'[OK] Filter "{parsed["field"]} {parsed["op"]}" added to variant "{var_name}"')
|
||||
dirty = True; print(f'[OK] Filter "{parsed["field"]} {parsed["op"]}" added to variant "{var_name}"')
|
||||
|
||||
elif operation == "add-dataParameter":
|
||||
settings = resolve_variant_settings()
|
||||
@@ -1966,7 +2043,7 @@ elif operation == "add-dataParameter":
|
||||
nodes = import_fragment(xml_doc, frag_xml)
|
||||
for node in nodes:
|
||||
insert_before_element(dp_el, node, None, dp_indent)
|
||||
print(f'[OK] DataParameter "{parsed["parameter"]}" added to variant "{var_name}"')
|
||||
dirty = True; print(f'[OK] DataParameter "{parsed["parameter"]}" added to variant "{var_name}"')
|
||||
|
||||
elif operation == "add-order":
|
||||
settings = resolve_variant_settings()
|
||||
@@ -1999,7 +2076,7 @@ elif operation == "add-order":
|
||||
insert_before_element(order_el, node, None, order_indent)
|
||||
|
||||
desc = "Auto" if parsed["field"] == "Auto" else f"{parsed['field']} {parsed['direction']}"
|
||||
print(f'[OK] Order "{desc}" added to variant "{var_name}"')
|
||||
dirty = True; print(f'[OK] Order "{desc}" added to variant "{var_name}"')
|
||||
|
||||
elif operation == "add-selection":
|
||||
settings = resolve_variant_settings()
|
||||
@@ -2052,7 +2129,7 @@ elif operation == "add-selection":
|
||||
for node in sel_nodes:
|
||||
insert_before_element(selection, node, None, sel_indent)
|
||||
target = f'group "{group_name}"' if group_name else f'variant "{var_name}"'
|
||||
print(f'[OK] Selection "{field_name}" added to {target}')
|
||||
dirty = True; print(f'[OK] Selection "{field_name}" added to {target}')
|
||||
|
||||
elif operation == "set-query":
|
||||
ds_node = resolve_data_set()
|
||||
@@ -2062,7 +2139,7 @@ elif operation == "set-query":
|
||||
print(f"No <query> element found in dataset '{ds_name}'", file=sys.stderr)
|
||||
sys.exit(1)
|
||||
query_el.text = resolve_query_value(value_arg, query_base_dir)
|
||||
print(f'[OK] Query replaced in dataset "{ds_name}"')
|
||||
dirty = True; print(f'[OK] Query replaced in dataset "{ds_name}"')
|
||||
|
||||
elif operation == "patch-query":
|
||||
ds_node = resolve_data_set()
|
||||
@@ -2095,7 +2172,7 @@ elif operation == "patch-query":
|
||||
|
||||
query_el.text = query_text.replace(old_str, new_str)
|
||||
suffix = " (1 occurrence)" if once else f" ({count} occurrence(s))"
|
||||
print(f'[OK] Query patched in dataset "{ds_name}": replaced \'{old_str}\'{suffix}')
|
||||
dirty = True; print(f'[OK] Query patched in dataset "{ds_name}": replaced \'{old_str}\'{suffix}')
|
||||
|
||||
elif operation == "set-outputParameter":
|
||||
settings = resolve_variant_settings()
|
||||
@@ -2108,9 +2185,9 @@ elif operation == "set-outputParameter":
|
||||
existing_param = find_element_by_child_value(output_el, "item", "parameter", parsed["key"], COR_NS)
|
||||
if existing_param is not None:
|
||||
remove_node_with_whitespace(existing_param)
|
||||
print(f'[OK] Replaced outputParameter "{parsed["key"]}" in variant "{var_name}"')
|
||||
dirty = True; print(f'[OK] Replaced outputParameter "{parsed["key"]}" in variant "{var_name}"')
|
||||
else:
|
||||
print(f'[OK] OutputParameter "{parsed["key"]}" added to variant "{var_name}"')
|
||||
dirty = True; print(f'[OK] OutputParameter "{parsed["key"]}" added to variant "{var_name}"')
|
||||
|
||||
frag_xml = build_output_param_fragment(parsed, output_indent)
|
||||
nodes = import_fragment(xml_doc, frag_xml)
|
||||
@@ -2136,7 +2213,7 @@ elif operation == "set-structure":
|
||||
for node in nodes:
|
||||
insert_before_element(settings, node, ref_node, settings_indent)
|
||||
|
||||
print(f'[OK] Structure set in variant "{var_name}": {value_arg}')
|
||||
dirty = True; print(f'[OK] Structure set in variant "{var_name}": {value_arg}')
|
||||
|
||||
elif operation == "modify-structure":
|
||||
settings = resolve_variant_settings()
|
||||
@@ -2210,12 +2287,12 @@ elif operation == "modify-structure":
|
||||
f'{item_indent}\t<dcsset:periodAdditionEnd xsi:type="xs:dateTime">0001-01-01T00:00:00</dcsset:periodAdditionEnd>',
|
||||
f'{item_indent}</dcsset:item>',
|
||||
]
|
||||
frag_xml = "\r\n".join(lines)
|
||||
frag_xml = "\n".join(lines)
|
||||
for node in import_fragment(xml_doc, frag_xml):
|
||||
insert_before_element(gi_el, node, None, item_indent)
|
||||
|
||||
desc = "details" if not t["groupBy"] else ", ".join(t["groupBy"])
|
||||
print(f'[OK] Group "{t["name"]}" groupItems updated: {desc}')
|
||||
dirty = True; print(f'[OK] Group "{t["name"]}" groupItems updated: {desc}')
|
||||
|
||||
elif operation == "add-dataSetLink":
|
||||
for val in values:
|
||||
@@ -2244,7 +2321,7 @@ elif operation == "add-dataSetLink":
|
||||
desc = f"{parsed['source']} > {parsed['dest']} on {parsed['sourceExpr']} = {parsed['destExpr']}"
|
||||
if parsed.get("parameter"):
|
||||
desc += f" [param {parsed['parameter']}]"
|
||||
print(f'[OK] DataSetLink "{desc}" added')
|
||||
dirty = True; print(f'[OK] DataSetLink "{desc}" added')
|
||||
|
||||
elif operation == "add-dataSet":
|
||||
child_indent = get_child_indent(xml_doc)
|
||||
@@ -2286,7 +2363,7 @@ elif operation == "add-dataSet":
|
||||
for node in nodes:
|
||||
insert_before_element(xml_doc, node, ref_node, child_indent)
|
||||
|
||||
print(f'[OK] DataSet "{parsed["name"]}" added (dataSource={ds_source_name})')
|
||||
dirty = True; print(f'[OK] DataSet "{parsed["name"]}" added (dataSource={ds_source_name})')
|
||||
|
||||
elif operation == "add-variant":
|
||||
child_indent = get_child_indent(xml_doc)
|
||||
@@ -2325,7 +2402,7 @@ elif operation == "add-variant":
|
||||
for node in nodes:
|
||||
insert_before_element(xml_doc, node, ref_node, child_indent)
|
||||
|
||||
print(f'[OK] Variant "{parsed["name"]}" ["{parsed["presentation"]}"] added')
|
||||
dirty = True; print(f'[OK] Variant "{parsed["name"]}" ["{parsed["presentation"]}"] added')
|
||||
|
||||
elif operation == "add-conditionalAppearance":
|
||||
settings = resolve_variant_settings()
|
||||
@@ -2348,7 +2425,7 @@ elif operation == "add-conditionalAppearance":
|
||||
desc += f" when {flt['field']} {flt['op']}"
|
||||
if parsed.get("fields"):
|
||||
desc += f" for {', '.join(parsed['fields'])}"
|
||||
print(f'[OK] ConditionalAppearance "{desc}" added to variant "{var_name}"')
|
||||
dirty = True; print(f'[OK] ConditionalAppearance "{desc}" added to variant "{var_name}"')
|
||||
|
||||
elif operation == "clear-selection":
|
||||
settings = resolve_variant_settings()
|
||||
@@ -2356,7 +2433,7 @@ elif operation == "clear-selection":
|
||||
selection = find_first_element(settings, ["selection"], SET_NS)
|
||||
if selection is not None:
|
||||
clear_container_children(selection)
|
||||
print(f'[OK] Selection cleared in variant "{var_name}"')
|
||||
dirty = True; print(f'[OK] Selection cleared in variant "{var_name}"')
|
||||
else:
|
||||
print(f'[INFO] No selection section in variant "{var_name}"')
|
||||
|
||||
@@ -2366,7 +2443,7 @@ elif operation == "clear-order":
|
||||
order_el = find_first_element(settings, ["order"], SET_NS)
|
||||
if order_el is not None:
|
||||
clear_container_children(order_el)
|
||||
print(f'[OK] Order cleared in variant "{var_name}"')
|
||||
dirty = True; print(f'[OK] Order cleared in variant "{var_name}"')
|
||||
else:
|
||||
print(f'[INFO] No order section in variant "{var_name}"')
|
||||
|
||||
@@ -2376,7 +2453,7 @@ elif operation == "clear-filter":
|
||||
filter_el = find_first_element(settings, ["filter"], SET_NS)
|
||||
if filter_el is not None:
|
||||
clear_container_children(filter_el)
|
||||
print(f'[OK] Filter cleared in variant "{var_name}"')
|
||||
dirty = True; print(f'[OK] Filter cleared in variant "{var_name}"')
|
||||
else:
|
||||
print(f'[INFO] No filter section in variant "{var_name}"')
|
||||
|
||||
@@ -2386,7 +2463,7 @@ elif operation == "clear-conditionalAppearance":
|
||||
ca_el = find_first_element(settings, ["conditionalAppearance"], SET_NS)
|
||||
if ca_el is not None:
|
||||
clear_container_children(ca_el)
|
||||
print(f'[OK] ConditionalAppearance cleared in variant "{var_name}"')
|
||||
dirty = True; print(f'[OK] ConditionalAppearance cleared in variant "{var_name}"')
|
||||
else:
|
||||
print(f'[INFO] No conditionalAppearance section in variant "{var_name}"')
|
||||
|
||||
@@ -2430,7 +2507,7 @@ elif operation == "modify-filter":
|
||||
uid = new_uuid() if parsed["userSettingID"] == "auto" else parsed["userSettingID"]
|
||||
set_or_create_child_element(filter_item, "userSettingID", SET_NS, uid, item_indent)
|
||||
|
||||
print(f'[OK] Filter "{parsed["field"]}" modified in variant "{var_name}"')
|
||||
dirty = True; print(f'[OK] Filter "{parsed["field"]}" modified in variant "{var_name}"')
|
||||
|
||||
elif operation == "modify-dataParameter":
|
||||
settings = resolve_variant_settings()
|
||||
@@ -2473,7 +2550,7 @@ elif operation == "modify-dataParameter":
|
||||
else:
|
||||
val_lines.append(f'{item_indent}<dcscor:value xsi:type="xs:string">{esc_xml(str(pv))}</dcscor:value>')
|
||||
|
||||
val_xml = "\r\n".join(val_lines)
|
||||
val_xml = "\n".join(val_lines)
|
||||
val_nodes = import_fragment(xml_doc, val_xml)
|
||||
for node in val_nodes:
|
||||
insert_before_element(dp_item, node, None, item_indent)
|
||||
@@ -2496,7 +2573,7 @@ elif operation == "modify-dataParameter":
|
||||
uid = new_uuid() if parsed["userSettingID"] == "auto" else parsed["userSettingID"]
|
||||
set_or_create_child_element(dp_item, "userSettingID", SET_NS, uid, item_indent)
|
||||
|
||||
print(f'[OK] DataParameter "{parsed["parameter"]}" modified in variant "{var_name}"')
|
||||
dirty = True; print(f'[OK] DataParameter "{parsed["parameter"]}" modified in variant "{var_name}"')
|
||||
|
||||
elif operation == "modify-field":
|
||||
ds_node = resolve_data_set()
|
||||
@@ -2519,6 +2596,13 @@ elif operation == "modify-field":
|
||||
"type": parsed["type"] if parsed.get("type") else existing["type"],
|
||||
"roles": parsed["roles"] if parsed.get("roles") else existing["roles"],
|
||||
"restrict": parsed["restrict"] if parsed.get("restrict") else existing["restrict"],
|
||||
# Preserve raw <valueType> only when user did NOT override type via shorthand.
|
||||
"rawValueType": None if parsed.get("type") else existing.get("_rawValueType"),
|
||||
# Preserve raw multi-lang title; pass existing ru content for change detection.
|
||||
"_rawTitle": existing.get("_rawTitle"),
|
||||
"_existingTitleRu": existing.get("title"),
|
||||
# Pass-through unknown children (e.g. <editFormat>, <appearance>, custom extensions).
|
||||
"_unknownChildren": existing.get("_unknownChildren"),
|
||||
}
|
||||
|
||||
# Find next element sibling for position
|
||||
@@ -2540,7 +2624,7 @@ elif operation == "modify-field":
|
||||
for node in nodes:
|
||||
insert_before_element(ds_node, node, next_sib, child_indent)
|
||||
|
||||
print(f'[OK] Field "{field_name}" modified in dataset "{ds_name}"')
|
||||
dirty = True; print(f'[OK] Field "{field_name}" modified in dataset "{ds_name}"')
|
||||
|
||||
elif operation == "set-field-role":
|
||||
ds_node = resolve_data_set()
|
||||
@@ -2571,14 +2655,30 @@ elif operation == "set-field-role":
|
||||
|
||||
field_indent = get_child_indent(field_el)
|
||||
|
||||
# Remove existing <role>
|
||||
# Remove existing <role> — but first capture OuterXml of sub-children that the
|
||||
# rebuild won't re-emit (custom <dcscom:groupFields>, <dcscom:addition>, etc.).
|
||||
old_role = next((ch for ch in field_el if isinstance(ch.tag, str) and local_name(ch) == "role" and etree.QName(ch.tag).namespace == SCH_NS), None)
|
||||
known_role_children = {"periodNumber", "periodType", "dimension", "ignoreNullsInGroups",
|
||||
"balance", "account", "accountTypeExpression", "additionType", "addition"}
|
||||
kv_keys = {k for k, _ in kv}
|
||||
preserved_role_children = []
|
||||
if old_role is not None:
|
||||
for gc in old_role:
|
||||
if not isinstance(gc.tag, str):
|
||||
continue
|
||||
ln = local_name(gc)
|
||||
if ln in known_role_children:
|
||||
continue
|
||||
if ln in kv_keys:
|
||||
continue
|
||||
raw = etree.tostring(gc, encoding="unicode", with_tail=False)
|
||||
raw = re.sub(r' xmlns(?::\w+)?="[^"]*"', "", raw)
|
||||
preserved_role_children.append(raw)
|
||||
remove_node_with_whitespace(old_role)
|
||||
|
||||
# Empty spec — remove only
|
||||
if not flags and not kv:
|
||||
print(f'[OK] Field "{data_path}" role cleared')
|
||||
dirty = True; print(f'[OK] Field "{data_path}" role cleared')
|
||||
continue
|
||||
|
||||
# Build new <role>
|
||||
@@ -2591,8 +2691,10 @@ elif operation == "set-field-role":
|
||||
lines.append(f"{field_indent}\t<dcscom:{flag}>true</dcscom:{flag}>")
|
||||
for k, v in kv:
|
||||
lines.append(f"{field_indent}\t<dcscom:{k}>{esc_xml(v)}</dcscom:{k}>")
|
||||
for raw in preserved_role_children:
|
||||
lines.append(f"{field_indent}\t" + raw)
|
||||
lines.append(f"{field_indent}</role>")
|
||||
frag_xml = "\r\n".join(lines)
|
||||
frag_xml = "\n".join(lines)
|
||||
|
||||
ref_node = next((ch for ch in field_el if isinstance(ch.tag, str) and local_name(ch) in ("valueType", "inputParameters") and etree.QName(ch.tag).namespace == SCH_NS), None)
|
||||
for node in import_fragment(xml_doc, frag_xml):
|
||||
@@ -2603,7 +2705,7 @@ elif operation == "set-field-role":
|
||||
parts.append(" ".join(f"@{f}" for f in flags))
|
||||
if kv:
|
||||
parts.append(" ".join(f"{k}={v}" for k, v in kv))
|
||||
print(f'[OK] Field "{data_path}" role set: {" ".join(parts)}')
|
||||
dirty = True; print(f'[OK] Field "{data_path}" role set: {" ".join(parts)}')
|
||||
|
||||
elif operation == "remove-field":
|
||||
ds_node = resolve_data_set()
|
||||
@@ -2615,7 +2717,7 @@ elif operation == "remove-field":
|
||||
print(f'[WARN] Field "{field_name}" not found in dataset "{ds_name}"')
|
||||
continue
|
||||
remove_node_with_whitespace(field_el)
|
||||
print(f'[OK] Field "{field_name}" removed from dataset "{ds_name}"')
|
||||
dirty = True; print(f'[OK] Field "{field_name}" removed from dataset "{ds_name}"')
|
||||
|
||||
try:
|
||||
settings = resolve_variant_settings()
|
||||
@@ -2625,7 +2727,7 @@ elif operation == "remove-field":
|
||||
sel_item = find_element_by_child_value(selection, "item", "field", field_name, SET_NS)
|
||||
if sel_item is not None:
|
||||
remove_node_with_whitespace(sel_item)
|
||||
print(f'[OK] Field "{field_name}" removed from selection of variant "{var_name}"')
|
||||
dirty = True; print(f'[OK] Field "{field_name}" removed from selection of variant "{var_name}"')
|
||||
except SystemExit:
|
||||
pass
|
||||
|
||||
@@ -2637,7 +2739,7 @@ elif operation == "remove-total":
|
||||
print(f'[WARN] TotalField "{data_path}" not found')
|
||||
continue
|
||||
remove_node_with_whitespace(total_el)
|
||||
print(f'[OK] TotalField "{data_path}" removed')
|
||||
dirty = True; print(f'[OK] TotalField "{data_path}" removed')
|
||||
|
||||
elif operation == "remove-calculated-field":
|
||||
for val in values:
|
||||
@@ -2647,7 +2749,7 @@ elif operation == "remove-calculated-field":
|
||||
print(f'[WARN] CalculatedField "{data_path}" not found')
|
||||
continue
|
||||
remove_node_with_whitespace(calc_el)
|
||||
print(f'[OK] CalculatedField "{data_path}" removed')
|
||||
dirty = True; print(f'[OK] CalculatedField "{data_path}" removed')
|
||||
|
||||
try:
|
||||
settings = resolve_variant_settings()
|
||||
@@ -2657,7 +2759,7 @@ elif operation == "remove-calculated-field":
|
||||
sel_item = find_element_by_child_value(selection, "item", "field", data_path, SET_NS)
|
||||
if sel_item is not None:
|
||||
remove_node_with_whitespace(sel_item)
|
||||
print(f'[OK] Field "{data_path}" removed from selection of variant "{var_name}"')
|
||||
dirty = True; print(f'[OK] Field "{data_path}" removed from selection of variant "{var_name}"')
|
||||
except SystemExit:
|
||||
pass
|
||||
|
||||
@@ -2669,7 +2771,7 @@ elif operation == "remove-parameter":
|
||||
print(f'[WARN] Parameter "{param_name}" not found')
|
||||
continue
|
||||
remove_node_with_whitespace(param_el)
|
||||
print(f'[OK] Parameter "{param_name}" removed')
|
||||
dirty = True; print(f'[OK] Parameter "{param_name}" removed')
|
||||
|
||||
elif operation == "remove-filter":
|
||||
settings = resolve_variant_settings()
|
||||
@@ -2685,7 +2787,7 @@ elif operation == "remove-filter":
|
||||
print(f'[WARN] Filter for "{field_name}" not found in variant "{var_name}"')
|
||||
continue
|
||||
remove_node_with_whitespace(filter_item)
|
||||
print(f'[OK] Filter for "{field_name}" removed from variant "{var_name}"')
|
||||
dirty = True; print(f'[OK] Filter for "{field_name}" removed from variant "{var_name}"')
|
||||
|
||||
elif operation == "add-drilldown":
|
||||
# String-based manipulation — templates use dcsat namespace with inline xmlns
|
||||
@@ -2816,7 +2918,7 @@ elif operation == "add-drilldown":
|
||||
cell_count += 1
|
||||
search_start = cell_end + 1
|
||||
|
||||
print(f"[OK] {drill_name} \u2192 {tpl_name} (param + {cell_count} cell(s))")
|
||||
dirty = True; print(f"[OK] {drill_name} \u2192 {tpl_name} (param + {cell_count} cell(s))")
|
||||
|
||||
# Apply insertions in reverse order to preserve offsets.
|
||||
# For same position: reverse insertion order so first resource ends up first in file.
|
||||
@@ -2829,13 +2931,35 @@ elif operation == "add-drilldown":
|
||||
with open(resolved_path, "wb") as f:
|
||||
f.write(b'\xef\xbb\xbf')
|
||||
f.write(raw_text.encode("utf-8"))
|
||||
print(f"[OK] Saved {resolved_path}")
|
||||
dirty = True; print(f"[OK] Saved {resolved_path}")
|
||||
sys.exit(0)
|
||||
|
||||
# ── 9. Save ─────────────────────────────────────────────────
|
||||
|
||||
if not dirty:
|
||||
print("[INFO] No changes -- file untouched")
|
||||
sys.exit(0)
|
||||
|
||||
xml_bytes = etree.tostring(tree, xml_declaration=True, encoding="UTF-8")
|
||||
xml_bytes = xml_bytes.replace(b"<?xml version='1.0' encoding='UTF-8'?>", b'<?xml version="1.0" encoding="utf-8"?>')
|
||||
|
||||
# Format-preserve post-processing (mirrors PS path):
|
||||
# (1) restore the original raw <DataCompositionSchema ...> opening tag — lxml collapses
|
||||
# multi-line xmlns into one line.
|
||||
xml_text = xml_bytes.decode("utf-8")
|
||||
if raw_root_opening:
|
||||
xml_text = re.sub(r"<DataCompositionSchema\b[^>]*>", lambda m: raw_root_opening, xml_text, count=1, flags=re.DOTALL)
|
||||
# Normalize self-closing tags: lxml writes `<foo bar="x"/>` already (no space), but be
|
||||
# defensive — strip any space before `/>` so PS and PY ports stay byte-equivalent.
|
||||
xml_text = re.sub(r"(?<=\S) />", "/>", xml_text)
|
||||
|
||||
# Normalize line endings to match source.
|
||||
if line_ending == "\r\n":
|
||||
xml_text = re.sub(r"(?<!\r)\n", "\r\n", xml_text)
|
||||
else:
|
||||
xml_text = xml_text.replace("\r\n", "\n")
|
||||
xml_bytes = xml_text.encode("utf-8")
|
||||
|
||||
if not xml_bytes.endswith(b"\n"):
|
||||
xml_bytes += b"\n"
|
||||
with open(resolved_path, "wb") as f:
|
||||
|
||||
+1
-1
@@ -34,7 +34,7 @@
|
||||
</dataSet>
|
||||
<calculatedField>
|
||||
<dataPath>ИмяРесурса</dataPath>
|
||||
<expression>""</expression>
|
||||
<expression>""</expression>
|
||||
<title xsi:type="v8:LocalStringType">
|
||||
<v8:item>
|
||||
<v8:lang>ru</v8:lang>
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
</dataSet>
|
||||
<calculatedField>
|
||||
<dataPath>ИмяРесурса</dataPath>
|
||||
<expression>""</expression>
|
||||
<expression>""</expression>
|
||||
<title xsi:type="v8:LocalStringType">
|
||||
<v8:item>
|
||||
<v8:lang>ru</v8:lang>
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
</dataSet>
|
||||
<calculatedField>
|
||||
<dataPath>ИмяРесурса</dataPath>
|
||||
<expression>""</expression>
|
||||
<expression>""</expression>
|
||||
<title xsi:type="v8:LocalStringType">
|
||||
<v8:item>
|
||||
<v8:lang>ru</v8:lang>
|
||||
|
||||
@@ -0,0 +1,96 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<DataCompositionSchema xmlns="http://v8.1c.ru/8.1/data-composition-system/schema"
|
||||
xmlns:dcscom="http://v8.1c.ru/8.1/data-composition-system/common"
|
||||
xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core"
|
||||
xmlns:dcsset="http://v8.1c.ru/8.1/data-composition-system/settings"
|
||||
xmlns:v8="http://v8.1c.ru/8.1/data/core"
|
||||
xmlns:v8ui="http://v8.1c.ru/8.1/data/ui"
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<dataSource>
|
||||
<name>ИсточникДанных1</name>
|
||||
<dataSourceType>Local</dataSourceType>
|
||||
</dataSource>
|
||||
<dataSet xsi:type="DataSetQuery">
|
||||
<name>DS</name>
|
||||
<field xsi:type="DataSetFieldField">
|
||||
<dataPath>Контрагент</dataPath>
|
||||
<field>Контрагент</field>
|
||||
<title xsi:type="v8:LocalStringType">
|
||||
<v8:item>
|
||||
<v8:lang>ru</v8:lang>
|
||||
<v8:content>Контрагент</v8:content>
|
||||
</v8:item>
|
||||
<v8:item>
|
||||
<v8:lang>en</v8:lang>
|
||||
<v8:content>Counterparty</v8:content>
|
||||
</v8:item>
|
||||
</title>
|
||||
<role>
|
||||
<dcscom:dimension>true</dcscom:dimension>
|
||||
</role>
|
||||
<valueType>
|
||||
<v8:Type>xs:string</v8:Type>
|
||||
<v8:StringQualifiers>
|
||||
<v8:Length>100</v8:Length>
|
||||
<v8:AllowedLength>Variable</v8:AllowedLength>
|
||||
</v8:StringQualifiers>
|
||||
</valueType>
|
||||
<appearance>
|
||||
<dcscor:item xsi:type="dcsset:SettingsParameterValue">
|
||||
<dcscor:parameter>Формат</dcscor:parameter>
|
||||
<dcscor:value xsi:type="v8:LocalStringType">
|
||||
<v8:item>
|
||||
<v8:lang>ru</v8:lang>
|
||||
<v8:content>ЧДЦ=2</v8:content>
|
||||
</v8:item>
|
||||
<v8:item>
|
||||
<v8:lang>en</v8:lang>
|
||||
<v8:content>NFD=2</v8:content>
|
||||
</v8:item>
|
||||
</dcscor:value>
|
||||
</dcscor:item>
|
||||
</appearance>
|
||||
</field>
|
||||
<dataSource>ИсточникДанных1</dataSource>
|
||||
<query>ВЫБРАТЬ 1 КАК Контрагент</query>
|
||||
</dataSet>
|
||||
<parameter>
|
||||
<name>Период</name>
|
||||
<title xsi:type="v8:LocalStringType">
|
||||
<v8:item>
|
||||
<v8:lang>ru</v8:lang>
|
||||
<v8:content>Период</v8:content>
|
||||
</v8:item>
|
||||
<v8:item>
|
||||
<v8:lang>en</v8:lang>
|
||||
<v8:content>Period</v8:content>
|
||||
</v8:item>
|
||||
</title>
|
||||
<valueType>
|
||||
<v8:Type>xs:dateTime</v8:Type>
|
||||
<v8:DateQualifiers>
|
||||
<v8:DateFractions>DateTime</v8:DateFractions>
|
||||
</v8:DateQualifiers>
|
||||
</valueType>
|
||||
</parameter>
|
||||
<settingsVariant>
|
||||
<dcsset:name>Основной</dcsset:name>
|
||||
<dcsset:presentation xsi:type="v8:LocalStringType">
|
||||
<v8:item>
|
||||
<v8:lang>ru</v8:lang>
|
||||
<v8:content>Основной</v8:content>
|
||||
</v8:item>
|
||||
</dcsset:presentation>
|
||||
<dcsset:settings xmlns:style="http://v8.1c.ru/8.1/data/ui/style" xmlns:sys="http://v8.1c.ru/8.1/data/ui/fonts/system" xmlns:web="http://v8.1c.ru/8.1/data/ui/colors/web" xmlns:win="http://v8.1c.ru/8.1/data/ui/colors/windows">
|
||||
<dcsset:item xsi:type="dcsset:StructureItemGroup">
|
||||
<dcsset:order>
|
||||
<dcsset:item xsi:type="dcsset:OrderItemAuto"/>
|
||||
</dcsset:order>
|
||||
<dcsset:selection>
|
||||
<dcsset:item xsi:type="dcsset:SelectedItemAuto"/>
|
||||
</dcsset:selection>
|
||||
</dcsset:item>
|
||||
</dcsset:settings>
|
||||
</settingsVariant>
|
||||
</DataCompositionSchema>
|
||||
@@ -0,0 +1,65 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<DataCompositionSchema xmlns="http://v8.1c.ru/8.1/data-composition-system/schema"
|
||||
xmlns:dcscom="http://v8.1c.ru/8.1/data-composition-system/common"
|
||||
xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core"
|
||||
xmlns:dcsset="http://v8.1c.ru/8.1/data-composition-system/settings"
|
||||
xmlns:v8="http://v8.1c.ru/8.1/data/core"
|
||||
xmlns:v8ui="http://v8.1c.ru/8.1/data/ui"
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<dataSource>
|
||||
<name>ИсточникДанных1</name>
|
||||
<dataSourceType>Local</dataSourceType>
|
||||
</dataSource>
|
||||
<dataSet xsi:type="DataSetQuery">
|
||||
<name>DS</name>
|
||||
<field xsi:type="DataSetFieldField">
|
||||
<dataPath>П</dataPath>
|
||||
<field>П</field>
|
||||
</field>
|
||||
<field xsi:type="DataSetFieldField">
|
||||
<dataPath>Имя</dataPath>
|
||||
<field>Имя</field>
|
||||
</field>
|
||||
<dataSource>ИсточникДанных1</dataSource>
|
||||
<query>ВЫБРАТЬ
|
||||
1 КАК П,
|
||||
"literal" КАК Имя</query>
|
||||
</dataSet>
|
||||
<parameter>
|
||||
<name>Период</name>
|
||||
<title xsi:type="v8:LocalStringType">
|
||||
<v8:item>
|
||||
<v8:lang>ru</v8:lang>
|
||||
<v8:content>Период</v8:content>
|
||||
</v8:item>
|
||||
</title>
|
||||
<valueType>
|
||||
<v8:Type>xs:dateTime</v8:Type>
|
||||
<v8:DateQualifiers>
|
||||
<v8:DateFractions>DateTime</v8:DateFractions>
|
||||
</v8:DateQualifiers>
|
||||
</valueType>
|
||||
</parameter>
|
||||
<settingsVariant>
|
||||
<dcsset:name>Основной</dcsset:name>
|
||||
<dcsset:presentation xsi:type="v8:LocalStringType">
|
||||
<v8:item>
|
||||
<v8:lang>ru</v8:lang>
|
||||
<v8:content>Основной</v8:content>
|
||||
</v8:item>
|
||||
</dcsset:presentation>
|
||||
<dcsset:settings xmlns:style="http://v8.1c.ru/8.1/data/ui/style" xmlns:sys="http://v8.1c.ru/8.1/data/ui/fonts/system" xmlns:web="http://v8.1c.ru/8.1/data/ui/colors/web" xmlns:win="http://v8.1c.ru/8.1/data/ui/colors/windows">
|
||||
<dcsset:selection>
|
||||
</dcsset:selection>
|
||||
<dcsset:item xsi:type="dcsset:StructureItemGroup">
|
||||
<dcsset:order>
|
||||
<dcsset:item xsi:type="dcsset:OrderItemAuto"/>
|
||||
</dcsset:order>
|
||||
<dcsset:selection>
|
||||
<dcsset:item xsi:type="dcsset:SelectedItemAuto"/>
|
||||
</dcsset:selection>
|
||||
</dcsset:item>
|
||||
</dcsset:settings>
|
||||
</settingsVariant>
|
||||
</DataCompositionSchema>
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"name": "NO-OP modify-field на отсутствующее поле — файл не трогаем (regression от XML round-trip бага)",
|
||||
"setup": "fixture:roundtrip-base",
|
||||
"params": {
|
||||
"templatePath": "Template.xml",
|
||||
"operation": "modify-field",
|
||||
"value": "НесуществующееПоле [Заголовок]"
|
||||
},
|
||||
"expect": {
|
||||
"stdoutContains": "No changes -- file untouched"
|
||||
},
|
||||
"idempotent": true
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"name": "modify-field сохраняет en/uk title (multi-lang) при ru-override",
|
||||
"setup": "fixture:multilang-base",
|
||||
"params": {
|
||||
"templatePath": "Template.xml",
|
||||
"operation": "modify-field",
|
||||
"value": "Контрагент [Имя контрагента]"
|
||||
},
|
||||
"idempotent": true
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"name": "modify-parameter сохраняет en title (multi-lang) при ru-override",
|
||||
"setup": "fixture:multilang-base",
|
||||
"params": {
|
||||
"templatePath": "Template.xml",
|
||||
"operation": "modify-parameter",
|
||||
"value": "Период [Новый период]"
|
||||
},
|
||||
"idempotent": true
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"name": "modify-field сохраняет неизвестные дочерние элементы (<appearance> со всеми вложениями) — структура из ERP",
|
||||
"setup": "fixture:multilang-base",
|
||||
"params": {
|
||||
"templatePath": "Template.xml",
|
||||
"operation": "modify-field",
|
||||
"value": "Контрагент @dimension"
|
||||
},
|
||||
"expect": {
|
||||
"stdoutContains": "Field \"Контрагент\" modified"
|
||||
},
|
||||
"idempotent": true
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"name": "Многострочный xmlns корня сохраняется после успешной операции",
|
||||
"setup": "fixture:roundtrip-base",
|
||||
"params": {
|
||||
"templatePath": "Template.xml",
|
||||
"operation": "set-query",
|
||||
"value": "DS=ВЫБРАТЬ 2 КАК П, "new" КАК Имя"
|
||||
},
|
||||
"idempotent": true
|
||||
}
|
||||
@@ -1,5 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<DataCompositionSchema xmlns="http://v8.1c.ru/8.1/data-composition-system/schema" xmlns:dcscom="http://v8.1c.ru/8.1/data-composition-system/common" xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core" xmlns:dcsset="http://v8.1c.ru/8.1/data-composition-system/settings" xmlns:v8="http://v8.1c.ru/8.1/data/core" xmlns:v8ui="http://v8.1c.ru/8.1/data/ui" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<DataCompositionSchema xmlns="http://v8.1c.ru/8.1/data-composition-system/schema"
|
||||
xmlns:dcscom="http://v8.1c.ru/8.1/data-composition-system/common"
|
||||
xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core"
|
||||
xmlns:dcsset="http://v8.1c.ru/8.1/data-composition-system/settings"
|
||||
xmlns:v8="http://v8.1c.ru/8.1/data/core"
|
||||
xmlns:v8ui="http://v8.1c.ru/8.1/data/ui"
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<dataSource>
|
||||
<name>ИсточникДанных1</name>
|
||||
<dataSourceType>Local</dataSourceType>
|
||||
@@ -65,10 +72,10 @@
|
||||
</dcsset:selection>
|
||||
<dcsset:item xsi:type="dcsset:StructureItemGroup">
|
||||
<dcsset:order>
|
||||
<dcsset:item xsi:type="dcsset:OrderItemAuto" />
|
||||
<dcsset:item xsi:type="dcsset:OrderItemAuto"/>
|
||||
</dcsset:order>
|
||||
<dcsset:selection>
|
||||
<dcsset:item xsi:type="dcsset:SelectedItemAuto" />
|
||||
<dcsset:item xsi:type="dcsset:SelectedItemAuto"/>
|
||||
</dcsset:selection>
|
||||
</dcsset:item>
|
||||
</dcsset:settings>
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<DataCompositionSchema xmlns="http://v8.1c.ru/8.1/data-composition-system/schema" xmlns:dcscom="http://v8.1c.ru/8.1/data-composition-system/common" xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core" xmlns:dcsset="http://v8.1c.ru/8.1/data-composition-system/settings" xmlns:v8="http://v8.1c.ru/8.1/data/core" xmlns:v8ui="http://v8.1c.ru/8.1/data/ui" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<DataCompositionSchema xmlns="http://v8.1c.ru/8.1/data-composition-system/schema"
|
||||
xmlns:dcscom="http://v8.1c.ru/8.1/data-composition-system/common"
|
||||
xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core"
|
||||
xmlns:dcsset="http://v8.1c.ru/8.1/data-composition-system/settings"
|
||||
xmlns:v8="http://v8.1c.ru/8.1/data/core"
|
||||
xmlns:v8ui="http://v8.1c.ru/8.1/data/ui"
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<dataSource>
|
||||
<name>ИсточникДанных1</name>
|
||||
<dataSourceType>Local</dataSourceType>
|
||||
@@ -53,10 +60,10 @@
|
||||
</dcsset:selection>
|
||||
<dcsset:item xsi:type="dcsset:StructureItemGroup">
|
||||
<dcsset:order>
|
||||
<dcsset:item xsi:type="dcsset:OrderItemAuto" />
|
||||
<dcsset:item xsi:type="dcsset:OrderItemAuto"/>
|
||||
</dcsset:order>
|
||||
<dcsset:selection>
|
||||
<dcsset:item xsi:type="dcsset:SelectedItemAuto" />
|
||||
<dcsset:item xsi:type="dcsset:SelectedItemAuto"/>
|
||||
</dcsset:selection>
|
||||
</dcsset:item>
|
||||
</dcsset:settings>
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<DataCompositionSchema xmlns="http://v8.1c.ru/8.1/data-composition-system/schema" xmlns:dcscom="http://v8.1c.ru/8.1/data-composition-system/common" xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core" xmlns:dcsset="http://v8.1c.ru/8.1/data-composition-system/settings" xmlns:v8="http://v8.1c.ru/8.1/data/core" xmlns:v8ui="http://v8.1c.ru/8.1/data/ui" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<DataCompositionSchema xmlns="http://v8.1c.ru/8.1/data-composition-system/schema"
|
||||
xmlns:dcscom="http://v8.1c.ru/8.1/data-composition-system/common"
|
||||
xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core"
|
||||
xmlns:dcsset="http://v8.1c.ru/8.1/data-composition-system/settings"
|
||||
xmlns:v8="http://v8.1c.ru/8.1/data/core"
|
||||
xmlns:v8ui="http://v8.1c.ru/8.1/data/ui"
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<dataSource>
|
||||
<name>ИсточникДанных1</name>
|
||||
<dataSourceType>Local</dataSourceType>
|
||||
@@ -41,10 +48,10 @@
|
||||
</dcsset:selection>
|
||||
<dcsset:item xsi:type="dcsset:StructureItemGroup">
|
||||
<dcsset:order>
|
||||
<dcsset:item xsi:type="dcsset:OrderItemAuto" />
|
||||
<dcsset:item xsi:type="dcsset:OrderItemAuto"/>
|
||||
</dcsset:order>
|
||||
<dcsset:selection>
|
||||
<dcsset:item xsi:type="dcsset:SelectedItemAuto" />
|
||||
<dcsset:item xsi:type="dcsset:SelectedItemAuto"/>
|
||||
</dcsset:selection>
|
||||
</dcsset:item>
|
||||
</dcsset:settings>
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<DataCompositionSchema xmlns="http://v8.1c.ru/8.1/data-composition-system/schema" xmlns:dcscom="http://v8.1c.ru/8.1/data-composition-system/common" xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core" xmlns:dcsset="http://v8.1c.ru/8.1/data-composition-system/settings" xmlns:v8="http://v8.1c.ru/8.1/data/core" xmlns:v8ui="http://v8.1c.ru/8.1/data/ui" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<DataCompositionSchema xmlns="http://v8.1c.ru/8.1/data-composition-system/schema"
|
||||
xmlns:dcscom="http://v8.1c.ru/8.1/data-composition-system/common"
|
||||
xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core"
|
||||
xmlns:dcsset="http://v8.1c.ru/8.1/data-composition-system/settings"
|
||||
xmlns:v8="http://v8.1c.ru/8.1/data/core"
|
||||
xmlns:v8ui="http://v8.1c.ru/8.1/data/ui"
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<dataSource>
|
||||
<name>ИсточникДанных1</name>
|
||||
<dataSourceType>Local</dataSourceType>
|
||||
@@ -52,10 +59,10 @@
|
||||
</dcsset:filter>
|
||||
<dcsset:item xsi:type="dcsset:StructureItemGroup">
|
||||
<dcsset:order>
|
||||
<dcsset:item xsi:type="dcsset:OrderItemAuto" />
|
||||
<dcsset:item xsi:type="dcsset:OrderItemAuto"/>
|
||||
</dcsset:order>
|
||||
<dcsset:selection>
|
||||
<dcsset:item xsi:type="dcsset:SelectedItemAuto" />
|
||||
<dcsset:item xsi:type="dcsset:SelectedItemAuto"/>
|
||||
</dcsset:selection>
|
||||
</dcsset:item>
|
||||
</dcsset:settings>
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<DataCompositionSchema xmlns="http://v8.1c.ru/8.1/data-composition-system/schema" xmlns:dcscom="http://v8.1c.ru/8.1/data-composition-system/common" xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core" xmlns:dcsset="http://v8.1c.ru/8.1/data-composition-system/settings" xmlns:v8="http://v8.1c.ru/8.1/data/core" xmlns:v8ui="http://v8.1c.ru/8.1/data/ui" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<DataCompositionSchema xmlns="http://v8.1c.ru/8.1/data-composition-system/schema"
|
||||
xmlns:dcscom="http://v8.1c.ru/8.1/data-composition-system/common"
|
||||
xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core"
|
||||
xmlns:dcsset="http://v8.1c.ru/8.1/data-composition-system/settings"
|
||||
xmlns:v8="http://v8.1c.ru/8.1/data/core"
|
||||
xmlns:v8ui="http://v8.1c.ru/8.1/data/ui"
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<dataSource>
|
||||
<name>ИсточникДанных1</name>
|
||||
<dataSourceType>Local</dataSourceType>
|
||||
@@ -43,10 +50,10 @@
|
||||
</dcsset:selection>
|
||||
<dcsset:item xsi:type="dcsset:StructureItemGroup">
|
||||
<dcsset:order>
|
||||
<dcsset:item xsi:type="dcsset:OrderItemAuto" />
|
||||
<dcsset:item xsi:type="dcsset:OrderItemAuto"/>
|
||||
</dcsset:order>
|
||||
<dcsset:selection>
|
||||
<dcsset:item xsi:type="dcsset:SelectedItemAuto" />
|
||||
<dcsset:item xsi:type="dcsset:SelectedItemAuto"/>
|
||||
</dcsset:selection>
|
||||
</dcsset:item>
|
||||
</dcsset:settings>
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<DataCompositionSchema xmlns="http://v8.1c.ru/8.1/data-composition-system/schema" xmlns:dcscom="http://v8.1c.ru/8.1/data-composition-system/common" xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core" xmlns:dcsset="http://v8.1c.ru/8.1/data-composition-system/settings" xmlns:v8="http://v8.1c.ru/8.1/data/core" xmlns:v8ui="http://v8.1c.ru/8.1/data/ui" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<DataCompositionSchema xmlns="http://v8.1c.ru/8.1/data-composition-system/schema"
|
||||
xmlns:dcscom="http://v8.1c.ru/8.1/data-composition-system/common"
|
||||
xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core"
|
||||
xmlns:dcsset="http://v8.1c.ru/8.1/data-composition-system/settings"
|
||||
xmlns:v8="http://v8.1c.ru/8.1/data/core"
|
||||
xmlns:v8ui="http://v8.1c.ru/8.1/data/ui"
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<dataSource>
|
||||
<name>ИсточникДанных1</name>
|
||||
<dataSourceType>Local</dataSourceType>
|
||||
@@ -40,10 +47,10 @@
|
||||
</dcsset:selection>
|
||||
<dcsset:item xsi:type="dcsset:StructureItemGroup">
|
||||
<dcsset:order>
|
||||
<dcsset:item xsi:type="dcsset:OrderItemAuto" />
|
||||
<dcsset:item xsi:type="dcsset:OrderItemAuto"/>
|
||||
</dcsset:order>
|
||||
<dcsset:selection>
|
||||
<dcsset:item xsi:type="dcsset:SelectedItemAuto" />
|
||||
<dcsset:item xsi:type="dcsset:SelectedItemAuto"/>
|
||||
</dcsset:selection>
|
||||
</dcsset:item>
|
||||
</dcsset:settings>
|
||||
|
||||
+10
-3
@@ -1,5 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<DataCompositionSchema xmlns="http://v8.1c.ru/8.1/data-composition-system/schema" xmlns:dcscom="http://v8.1c.ru/8.1/data-composition-system/common" xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core" xmlns:dcsset="http://v8.1c.ru/8.1/data-composition-system/settings" xmlns:v8="http://v8.1c.ru/8.1/data/core" xmlns:v8ui="http://v8.1c.ru/8.1/data/ui" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<DataCompositionSchema xmlns="http://v8.1c.ru/8.1/data-composition-system/schema"
|
||||
xmlns:dcscom="http://v8.1c.ru/8.1/data-composition-system/common"
|
||||
xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core"
|
||||
xmlns:dcsset="http://v8.1c.ru/8.1/data-composition-system/settings"
|
||||
xmlns:v8="http://v8.1c.ru/8.1/data/core"
|
||||
xmlns:v8ui="http://v8.1c.ru/8.1/data/ui"
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<dataSource>
|
||||
<name>ИсточникДанных1</name>
|
||||
<dataSourceType>Local</dataSourceType>
|
||||
@@ -67,10 +74,10 @@
|
||||
</dcsset:selection>
|
||||
<dcsset:item xsi:type="dcsset:StructureItemGroup">
|
||||
<dcsset:order>
|
||||
<dcsset:item xsi:type="dcsset:OrderItemAuto" />
|
||||
<dcsset:item xsi:type="dcsset:OrderItemAuto"/>
|
||||
</dcsset:order>
|
||||
<dcsset:selection>
|
||||
<dcsset:item xsi:type="dcsset:SelectedItemAuto" />
|
||||
<dcsset:item xsi:type="dcsset:SelectedItemAuto"/>
|
||||
</dcsset:selection>
|
||||
</dcsset:item>
|
||||
</dcsset:settings>
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<DataCompositionSchema xmlns="http://v8.1c.ru/8.1/data-composition-system/schema" xmlns:dcscom="http://v8.1c.ru/8.1/data-composition-system/common" xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core" xmlns:dcsset="http://v8.1c.ru/8.1/data-composition-system/settings" xmlns:v8="http://v8.1c.ru/8.1/data/core" xmlns:v8ui="http://v8.1c.ru/8.1/data/ui" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<DataCompositionSchema xmlns="http://v8.1c.ru/8.1/data-composition-system/schema"
|
||||
xmlns:dcscom="http://v8.1c.ru/8.1/data-composition-system/common"
|
||||
xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core"
|
||||
xmlns:dcsset="http://v8.1c.ru/8.1/data-composition-system/settings"
|
||||
xmlns:v8="http://v8.1c.ru/8.1/data/core"
|
||||
xmlns:v8ui="http://v8.1c.ru/8.1/data/ui"
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<dataSource>
|
||||
<name>ИсточникДанных1</name>
|
||||
<dataSourceType>Local</dataSourceType>
|
||||
@@ -73,10 +80,10 @@
|
||||
</dcsset:selection>
|
||||
<dcsset:item xsi:type="dcsset:StructureItemGroup">
|
||||
<dcsset:order>
|
||||
<dcsset:item xsi:type="dcsset:OrderItemAuto" />
|
||||
<dcsset:item xsi:type="dcsset:OrderItemAuto"/>
|
||||
</dcsset:order>
|
||||
<dcsset:selection>
|
||||
<dcsset:item xsi:type="dcsset:SelectedItemAuto" />
|
||||
<dcsset:item xsi:type="dcsset:SelectedItemAuto"/>
|
||||
</dcsset:selection>
|
||||
</dcsset:item>
|
||||
</dcsset:settings>
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<DataCompositionSchema xmlns="http://v8.1c.ru/8.1/data-composition-system/schema" xmlns:dcscom="http://v8.1c.ru/8.1/data-composition-system/common" xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core" xmlns:dcsset="http://v8.1c.ru/8.1/data-composition-system/settings" xmlns:v8="http://v8.1c.ru/8.1/data/core" xmlns:v8ui="http://v8.1c.ru/8.1/data/ui" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<DataCompositionSchema xmlns="http://v8.1c.ru/8.1/data-composition-system/schema"
|
||||
xmlns:dcscom="http://v8.1c.ru/8.1/data-composition-system/common"
|
||||
xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core"
|
||||
xmlns:dcsset="http://v8.1c.ru/8.1/data-composition-system/settings"
|
||||
xmlns:v8="http://v8.1c.ru/8.1/data/core"
|
||||
xmlns:v8ui="http://v8.1c.ru/8.1/data/ui"
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<dataSource>
|
||||
<name>ИсточникДанных1</name>
|
||||
<dataSourceType>Local</dataSourceType>
|
||||
@@ -27,7 +34,7 @@
|
||||
</dcsset:presentation>
|
||||
<dcsset:settings xmlns:style="http://v8.1c.ru/8.1/data/ui/style" xmlns:sys="http://v8.1c.ru/8.1/data/ui/fonts/system" xmlns:web="http://v8.1c.ru/8.1/data/ui/colors/web" xmlns:win="http://v8.1c.ru/8.1/data/ui/colors/windows">
|
||||
<dcsset:selection>
|
||||
<dcsset:item xsi:type="dcsset:SelectedItemAuto" />
|
||||
<dcsset:item xsi:type="dcsset:SelectedItemAuto"/>
|
||||
<dcsset:item xsi:type="dcsset:SelectedItemField">
|
||||
<dcsset:field>Поле1</dcsset:field>
|
||||
</dcsset:item>
|
||||
@@ -37,10 +44,10 @@
|
||||
</dcsset:selection>
|
||||
<dcsset:item xsi:type="dcsset:StructureItemGroup">
|
||||
<dcsset:order>
|
||||
<dcsset:item xsi:type="dcsset:OrderItemAuto" />
|
||||
<dcsset:item xsi:type="dcsset:OrderItemAuto"/>
|
||||
</dcsset:order>
|
||||
<dcsset:selection>
|
||||
<dcsset:item xsi:type="dcsset:SelectedItemAuto" />
|
||||
<dcsset:item xsi:type="dcsset:SelectedItemAuto"/>
|
||||
</dcsset:selection>
|
||||
</dcsset:item>
|
||||
</dcsset:settings>
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<DataCompositionSchema xmlns="http://v8.1c.ru/8.1/data-composition-system/schema" xmlns:dcscom="http://v8.1c.ru/8.1/data-composition-system/common" xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core" xmlns:dcsset="http://v8.1c.ru/8.1/data-composition-system/settings" xmlns:v8="http://v8.1c.ru/8.1/data/core" xmlns:v8ui="http://v8.1c.ru/8.1/data/ui" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<DataCompositionSchema xmlns="http://v8.1c.ru/8.1/data-composition-system/schema"
|
||||
xmlns:dcscom="http://v8.1c.ru/8.1/data-composition-system/common"
|
||||
xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core"
|
||||
xmlns:dcsset="http://v8.1c.ru/8.1/data-composition-system/settings"
|
||||
xmlns:v8="http://v8.1c.ru/8.1/data/core"
|
||||
xmlns:v8ui="http://v8.1c.ru/8.1/data/ui"
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<dataSource>
|
||||
<name>ИсточникДанных1</name>
|
||||
<dataSourceType>Local</dataSourceType>
|
||||
@@ -38,10 +45,10 @@
|
||||
</dcsset:selection>
|
||||
<dcsset:item xsi:type="dcsset:StructureItemGroup">
|
||||
<dcsset:order>
|
||||
<dcsset:item xsi:type="dcsset:OrderItemAuto" />
|
||||
<dcsset:item xsi:type="dcsset:OrderItemAuto"/>
|
||||
</dcsset:order>
|
||||
<dcsset:selection>
|
||||
<dcsset:item xsi:type="dcsset:SelectedItemAuto" />
|
||||
<dcsset:item xsi:type="dcsset:SelectedItemAuto"/>
|
||||
</dcsset:selection>
|
||||
</dcsset:item>
|
||||
</dcsset:settings>
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<DataCompositionSchema xmlns="http://v8.1c.ru/8.1/data-composition-system/schema" xmlns:dcscom="http://v8.1c.ru/8.1/data-composition-system/common" xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core" xmlns:dcsset="http://v8.1c.ru/8.1/data-composition-system/settings" xmlns:v8="http://v8.1c.ru/8.1/data/core" xmlns:v8ui="http://v8.1c.ru/8.1/data/ui" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<DataCompositionSchema xmlns="http://v8.1c.ru/8.1/data-composition-system/schema"
|
||||
xmlns:dcscom="http://v8.1c.ru/8.1/data-composition-system/common"
|
||||
xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core"
|
||||
xmlns:dcsset="http://v8.1c.ru/8.1/data-composition-system/settings"
|
||||
xmlns:v8="http://v8.1c.ru/8.1/data/core"
|
||||
xmlns:v8ui="http://v8.1c.ru/8.1/data/ui"
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<dataSource>
|
||||
<name>ИсточникДанных1</name>
|
||||
<dataSourceType>Local</dataSourceType>
|
||||
@@ -42,10 +49,10 @@
|
||||
</dcsset:selection>
|
||||
<dcsset:item xsi:type="dcsset:StructureItemGroup">
|
||||
<dcsset:order>
|
||||
<dcsset:item xsi:type="dcsset:OrderItemAuto" />
|
||||
<dcsset:item xsi:type="dcsset:OrderItemAuto"/>
|
||||
</dcsset:order>
|
||||
<dcsset:selection>
|
||||
<dcsset:item xsi:type="dcsset:SelectedItemAuto" />
|
||||
<dcsset:item xsi:type="dcsset:SelectedItemAuto"/>
|
||||
</dcsset:selection>
|
||||
</dcsset:item>
|
||||
</dcsset:settings>
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<DataCompositionSchema xmlns="http://v8.1c.ru/8.1/data-composition-system/schema" xmlns:dcscom="http://v8.1c.ru/8.1/data-composition-system/common" xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core" xmlns:dcsset="http://v8.1c.ru/8.1/data-composition-system/settings" xmlns:v8="http://v8.1c.ru/8.1/data/core" xmlns:v8ui="http://v8.1c.ru/8.1/data/ui" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<DataCompositionSchema xmlns="http://v8.1c.ru/8.1/data-composition-system/schema"
|
||||
xmlns:dcscom="http://v8.1c.ru/8.1/data-composition-system/common"
|
||||
xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core"
|
||||
xmlns:dcsset="http://v8.1c.ru/8.1/data-composition-system/settings"
|
||||
xmlns:v8="http://v8.1c.ru/8.1/data/core"
|
||||
xmlns:v8ui="http://v8.1c.ru/8.1/data/ui"
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<dataSource>
|
||||
<name>ИсточникДанных1</name>
|
||||
<dataSourceType>Local</dataSourceType>
|
||||
@@ -36,10 +43,10 @@
|
||||
</dcsset:conditionalAppearance>
|
||||
<dcsset:item xsi:type="dcsset:StructureItemGroup">
|
||||
<dcsset:order>
|
||||
<dcsset:item xsi:type="dcsset:OrderItemAuto" />
|
||||
<dcsset:item xsi:type="dcsset:OrderItemAuto"/>
|
||||
</dcsset:order>
|
||||
<dcsset:selection>
|
||||
<dcsset:item xsi:type="dcsset:SelectedItemAuto" />
|
||||
<dcsset:item xsi:type="dcsset:SelectedItemAuto"/>
|
||||
</dcsset:selection>
|
||||
</dcsset:item>
|
||||
</dcsset:settings>
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<DataCompositionSchema xmlns="http://v8.1c.ru/8.1/data-composition-system/schema" xmlns:dcscom="http://v8.1c.ru/8.1/data-composition-system/common" xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core" xmlns:dcsset="http://v8.1c.ru/8.1/data-composition-system/settings" xmlns:v8="http://v8.1c.ru/8.1/data/core" xmlns:v8ui="http://v8.1c.ru/8.1/data/ui" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<DataCompositionSchema xmlns="http://v8.1c.ru/8.1/data-composition-system/schema"
|
||||
xmlns:dcscom="http://v8.1c.ru/8.1/data-composition-system/common"
|
||||
xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core"
|
||||
xmlns:dcsset="http://v8.1c.ru/8.1/data-composition-system/settings"
|
||||
xmlns:v8="http://v8.1c.ru/8.1/data/core"
|
||||
xmlns:v8ui="http://v8.1c.ru/8.1/data/ui"
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<dataSource>
|
||||
<name>ИсточникДанных1</name>
|
||||
<dataSourceType>Local</dataSourceType>
|
||||
@@ -44,7 +51,7 @@
|
||||
</dcsset:selection>
|
||||
<dcsset:conditionalAppearance>
|
||||
<dcsset:item>
|
||||
<dcsset:selection />
|
||||
<dcsset:selection/>
|
||||
<dcsset:filter>
|
||||
<dcsset:item xsi:type="dcsset:FilterItemComparison">
|
||||
<dcsset:left xsi:type="dcscor:Field">ПараметрыДанных.ПорядокОкругления</dcsset:left>
|
||||
@@ -65,7 +72,7 @@
|
||||
</dcsset:appearance>
|
||||
</dcsset:item>
|
||||
<dcsset:item>
|
||||
<dcsset:selection />
|
||||
<dcsset:selection/>
|
||||
<dcsset:filter>
|
||||
<dcsset:item xsi:type="dcsset:FilterItemGroup">
|
||||
<dcsset:groupType>OrGroup</dcsset:groupType>
|
||||
@@ -96,10 +103,10 @@
|
||||
</dcsset:conditionalAppearance>
|
||||
<dcsset:item xsi:type="dcsset:StructureItemGroup">
|
||||
<dcsset:order>
|
||||
<dcsset:item xsi:type="dcsset:OrderItemAuto" />
|
||||
<dcsset:item xsi:type="dcsset:OrderItemAuto"/>
|
||||
</dcsset:order>
|
||||
<dcsset:selection>
|
||||
<dcsset:item xsi:type="dcsset:SelectedItemAuto" />
|
||||
<dcsset:item xsi:type="dcsset:SelectedItemAuto"/>
|
||||
</dcsset:selection>
|
||||
</dcsset:item>
|
||||
</dcsset:settings>
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<DataCompositionSchema xmlns="http://v8.1c.ru/8.1/data-composition-system/schema"
|
||||
xmlns:dcscom="http://v8.1c.ru/8.1/data-composition-system/common"
|
||||
xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core"
|
||||
xmlns:dcsset="http://v8.1c.ru/8.1/data-composition-system/settings"
|
||||
xmlns:v8="http://v8.1c.ru/8.1/data/core"
|
||||
xmlns:v8ui="http://v8.1c.ru/8.1/data/ui"
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<dataSource>
|
||||
<name>ИсточникДанных1</name>
|
||||
<dataSourceType>Local</dataSourceType>
|
||||
</dataSource>
|
||||
<dataSet xsi:type="DataSetQuery">
|
||||
<name>DS</name>
|
||||
<field xsi:type="DataSetFieldField">
|
||||
<dataPath>П</dataPath>
|
||||
<field>П</field>
|
||||
</field>
|
||||
<field xsi:type="DataSetFieldField">
|
||||
<dataPath>Имя</dataPath>
|
||||
<field>Имя</field>
|
||||
</field>
|
||||
<dataSource>ИсточникДанных1</dataSource>
|
||||
<query>ВЫБРАТЬ
|
||||
1 КАК П,
|
||||
"literal" КАК Имя</query>
|
||||
</dataSet>
|
||||
<parameter>
|
||||
<name>Период</name>
|
||||
<title xsi:type="v8:LocalStringType">
|
||||
<v8:item>
|
||||
<v8:lang>ru</v8:lang>
|
||||
<v8:content>Период</v8:content>
|
||||
</v8:item>
|
||||
</title>
|
||||
<valueType>
|
||||
<v8:Type>xs:dateTime</v8:Type>
|
||||
<v8:DateQualifiers>
|
||||
<v8:DateFractions>DateTime</v8:DateFractions>
|
||||
</v8:DateQualifiers>
|
||||
</valueType>
|
||||
</parameter>
|
||||
<settingsVariant>
|
||||
<dcsset:name>Основной</dcsset:name>
|
||||
<dcsset:presentation xsi:type="v8:LocalStringType">
|
||||
<v8:item>
|
||||
<v8:lang>ru</v8:lang>
|
||||
<v8:content>Основной</v8:content>
|
||||
</v8:item>
|
||||
</dcsset:presentation>
|
||||
<dcsset:settings xmlns:style="http://v8.1c.ru/8.1/data/ui/style" xmlns:sys="http://v8.1c.ru/8.1/data/ui/fonts/system" xmlns:web="http://v8.1c.ru/8.1/data/ui/colors/web" xmlns:win="http://v8.1c.ru/8.1/data/ui/colors/windows">
|
||||
<dcsset:selection>
|
||||
</dcsset:selection>
|
||||
<dcsset:item xsi:type="dcsset:StructureItemGroup">
|
||||
<dcsset:order>
|
||||
<dcsset:item xsi:type="dcsset:OrderItemAuto"/>
|
||||
</dcsset:order>
|
||||
<dcsset:selection>
|
||||
<dcsset:item xsi:type="dcsset:SelectedItemAuto"/>
|
||||
</dcsset:selection>
|
||||
</dcsset:item>
|
||||
</dcsset:settings>
|
||||
</settingsVariant>
|
||||
</DataCompositionSchema>
|
||||
+10
-3
@@ -1,5 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<DataCompositionSchema xmlns="http://v8.1c.ru/8.1/data-composition-system/schema" xmlns:dcscom="http://v8.1c.ru/8.1/data-composition-system/common" xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core" xmlns:dcsset="http://v8.1c.ru/8.1/data-composition-system/settings" xmlns:v8="http://v8.1c.ru/8.1/data/core" xmlns:v8ui="http://v8.1c.ru/8.1/data/ui" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<DataCompositionSchema xmlns="http://v8.1c.ru/8.1/data-composition-system/schema"
|
||||
xmlns:dcscom="http://v8.1c.ru/8.1/data-composition-system/common"
|
||||
xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core"
|
||||
xmlns:dcsset="http://v8.1c.ru/8.1/data-composition-system/settings"
|
||||
xmlns:v8="http://v8.1c.ru/8.1/data/core"
|
||||
xmlns:v8ui="http://v8.1c.ru/8.1/data/ui"
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<dataSource>
|
||||
<name>ИсточникДанных1</name>
|
||||
<dataSourceType>Local</dataSourceType>
|
||||
@@ -56,10 +63,10 @@
|
||||
</dcsset:dataParameters>
|
||||
<dcsset:item xsi:type="dcsset:StructureItemGroup">
|
||||
<dcsset:order>
|
||||
<dcsset:item xsi:type="dcsset:OrderItemAuto" />
|
||||
<dcsset:item xsi:type="dcsset:OrderItemAuto"/>
|
||||
</dcsset:order>
|
||||
<dcsset:selection>
|
||||
<dcsset:item xsi:type="dcsset:SelectedItemAuto" />
|
||||
<dcsset:item xsi:type="dcsset:SelectedItemAuto"/>
|
||||
</dcsset:selection>
|
||||
</dcsset:item>
|
||||
</dcsset:settings>
|
||||
|
||||
+10
-3
@@ -1,5 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<DataCompositionSchema xmlns="http://v8.1c.ru/8.1/data-composition-system/schema" xmlns:dcscom="http://v8.1c.ru/8.1/data-composition-system/common" xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core" xmlns:dcsset="http://v8.1c.ru/8.1/data-composition-system/settings" xmlns:v8="http://v8.1c.ru/8.1/data/core" xmlns:v8ui="http://v8.1c.ru/8.1/data/ui" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<DataCompositionSchema xmlns="http://v8.1c.ru/8.1/data-composition-system/schema"
|
||||
xmlns:dcscom="http://v8.1c.ru/8.1/data-composition-system/common"
|
||||
xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core"
|
||||
xmlns:dcsset="http://v8.1c.ru/8.1/data-composition-system/settings"
|
||||
xmlns:v8="http://v8.1c.ru/8.1/data/core"
|
||||
xmlns:v8ui="http://v8.1c.ru/8.1/data/ui"
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<dataSource>
|
||||
<name>ИсточникДанных1</name>
|
||||
<dataSourceType>Local</dataSourceType>
|
||||
@@ -67,10 +74,10 @@
|
||||
</dcsset:selection>
|
||||
<dcsset:item xsi:type="dcsset:StructureItemGroup">
|
||||
<dcsset:order>
|
||||
<dcsset:item xsi:type="dcsset:OrderItemAuto" />
|
||||
<dcsset:item xsi:type="dcsset:OrderItemAuto"/>
|
||||
</dcsset:order>
|
||||
<dcsset:selection>
|
||||
<dcsset:item xsi:type="dcsset:SelectedItemAuto" />
|
||||
<dcsset:item xsi:type="dcsset:SelectedItemAuto"/>
|
||||
</dcsset:selection>
|
||||
</dcsset:item>
|
||||
</dcsset:settings>
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<DataCompositionSchema xmlns="http://v8.1c.ru/8.1/data-composition-system/schema" xmlns:dcscom="http://v8.1c.ru/8.1/data-composition-system/common" xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core" xmlns:dcsset="http://v8.1c.ru/8.1/data-composition-system/settings" xmlns:v8="http://v8.1c.ru/8.1/data/core" xmlns:v8ui="http://v8.1c.ru/8.1/data/ui" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<DataCompositionSchema xmlns="http://v8.1c.ru/8.1/data-composition-system/schema"
|
||||
xmlns:dcscom="http://v8.1c.ru/8.1/data-composition-system/common"
|
||||
xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core"
|
||||
xmlns:dcsset="http://v8.1c.ru/8.1/data-composition-system/settings"
|
||||
xmlns:v8="http://v8.1c.ru/8.1/data/core"
|
||||
xmlns:v8ui="http://v8.1c.ru/8.1/data/ui"
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<dataSource>
|
||||
<name>ИсточникДанных1</name>
|
||||
<dataSourceType>Local</dataSourceType>
|
||||
@@ -74,10 +81,10 @@
|
||||
</dcsset:selection>
|
||||
<dcsset:item xsi:type="dcsset:StructureItemGroup">
|
||||
<dcsset:order>
|
||||
<dcsset:item xsi:type="dcsset:OrderItemAuto" />
|
||||
<dcsset:item xsi:type="dcsset:OrderItemAuto"/>
|
||||
</dcsset:order>
|
||||
<dcsset:selection>
|
||||
<dcsset:item xsi:type="dcsset:SelectedItemAuto" />
|
||||
<dcsset:item xsi:type="dcsset:SelectedItemAuto"/>
|
||||
</dcsset:selection>
|
||||
</dcsset:item>
|
||||
</dcsset:settings>
|
||||
|
||||
+10
-3
@@ -1,5 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<DataCompositionSchema xmlns="http://v8.1c.ru/8.1/data-composition-system/schema" xmlns:dcscom="http://v8.1c.ru/8.1/data-composition-system/common" xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core" xmlns:dcsset="http://v8.1c.ru/8.1/data-composition-system/settings" xmlns:v8="http://v8.1c.ru/8.1/data/core" xmlns:v8ui="http://v8.1c.ru/8.1/data/ui" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<DataCompositionSchema xmlns="http://v8.1c.ru/8.1/data-composition-system/schema"
|
||||
xmlns:dcscom="http://v8.1c.ru/8.1/data-composition-system/common"
|
||||
xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core"
|
||||
xmlns:dcsset="http://v8.1c.ru/8.1/data-composition-system/settings"
|
||||
xmlns:v8="http://v8.1c.ru/8.1/data/core"
|
||||
xmlns:v8ui="http://v8.1c.ru/8.1/data/ui"
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<dataSource>
|
||||
<name>ИсточникДанных1</name>
|
||||
<dataSourceType>Local</dataSourceType>
|
||||
@@ -43,10 +50,10 @@
|
||||
</dcsset:selection>
|
||||
<dcsset:item xsi:type="dcsset:StructureItemGroup">
|
||||
<dcsset:order>
|
||||
<dcsset:item xsi:type="dcsset:OrderItemAuto" />
|
||||
<dcsset:item xsi:type="dcsset:OrderItemAuto"/>
|
||||
</dcsset:order>
|
||||
<dcsset:selection>
|
||||
<dcsset:item xsi:type="dcsset:SelectedItemAuto" />
|
||||
<dcsset:item xsi:type="dcsset:SelectedItemAuto"/>
|
||||
</dcsset:selection>
|
||||
</dcsset:item>
|
||||
</dcsset:settings>
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<DataCompositionSchema xmlns="http://v8.1c.ru/8.1/data-composition-system/schema" xmlns:dcscom="http://v8.1c.ru/8.1/data-composition-system/common" xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core" xmlns:dcsset="http://v8.1c.ru/8.1/data-composition-system/settings" xmlns:v8="http://v8.1c.ru/8.1/data/core" xmlns:v8ui="http://v8.1c.ru/8.1/data/ui" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<DataCompositionSchema xmlns="http://v8.1c.ru/8.1/data-composition-system/schema"
|
||||
xmlns:dcscom="http://v8.1c.ru/8.1/data-composition-system/common"
|
||||
xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core"
|
||||
xmlns:dcsset="http://v8.1c.ru/8.1/data-composition-system/settings"
|
||||
xmlns:v8="http://v8.1c.ru/8.1/data/core"
|
||||
xmlns:v8ui="http://v8.1c.ru/8.1/data/ui"
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<dataSource>
|
||||
<name>ИсточникДанных1</name>
|
||||
<dataSourceType>Local</dataSourceType>
|
||||
@@ -53,10 +60,10 @@
|
||||
</dcsset:selection>
|
||||
<dcsset:item xsi:type="dcsset:StructureItemGroup">
|
||||
<dcsset:order>
|
||||
<dcsset:item xsi:type="dcsset:OrderItemAuto" />
|
||||
<dcsset:item xsi:type="dcsset:OrderItemAuto"/>
|
||||
</dcsset:order>
|
||||
<dcsset:selection>
|
||||
<dcsset:item xsi:type="dcsset:SelectedItemAuto" />
|
||||
<dcsset:item xsi:type="dcsset:SelectedItemAuto"/>
|
||||
</dcsset:selection>
|
||||
</dcsset:item>
|
||||
</dcsset:settings>
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<DataCompositionSchema xmlns="http://v8.1c.ru/8.1/data-composition-system/schema" xmlns:dcscom="http://v8.1c.ru/8.1/data-composition-system/common" xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core" xmlns:dcsset="http://v8.1c.ru/8.1/data-composition-system/settings" xmlns:v8="http://v8.1c.ru/8.1/data/core" xmlns:v8ui="http://v8.1c.ru/8.1/data/ui" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<DataCompositionSchema xmlns="http://v8.1c.ru/8.1/data-composition-system/schema"
|
||||
xmlns:dcscom="http://v8.1c.ru/8.1/data-composition-system/common"
|
||||
xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core"
|
||||
xmlns:dcsset="http://v8.1c.ru/8.1/data-composition-system/settings"
|
||||
xmlns:v8="http://v8.1c.ru/8.1/data/core"
|
||||
xmlns:v8ui="http://v8.1c.ru/8.1/data/ui"
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<dataSource>
|
||||
<name>ИсточникДанных1</name>
|
||||
<dataSourceType>Local</dataSourceType>
|
||||
@@ -40,10 +47,10 @@
|
||||
</dcsset:selection>
|
||||
<dcsset:item xsi:type="dcsset:StructureItemGroup">
|
||||
<dcsset:order>
|
||||
<dcsset:item xsi:type="dcsset:OrderItemAuto" />
|
||||
<dcsset:item xsi:type="dcsset:OrderItemAuto"/>
|
||||
</dcsset:order>
|
||||
<dcsset:selection>
|
||||
<dcsset:item xsi:type="dcsset:SelectedItemAuto" />
|
||||
<dcsset:item xsi:type="dcsset:SelectedItemAuto"/>
|
||||
</dcsset:selection>
|
||||
</dcsset:item>
|
||||
</dcsset:settings>
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<DataCompositionSchema xmlns="http://v8.1c.ru/8.1/data-composition-system/schema" xmlns:dcscom="http://v8.1c.ru/8.1/data-composition-system/common" xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core" xmlns:dcsset="http://v8.1c.ru/8.1/data-composition-system/settings" xmlns:v8="http://v8.1c.ru/8.1/data/core" xmlns:v8ui="http://v8.1c.ru/8.1/data/ui" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<DataCompositionSchema xmlns="http://v8.1c.ru/8.1/data-composition-system/schema"
|
||||
xmlns:dcscom="http://v8.1c.ru/8.1/data-composition-system/common"
|
||||
xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core"
|
||||
xmlns:dcsset="http://v8.1c.ru/8.1/data-composition-system/settings"
|
||||
xmlns:v8="http://v8.1c.ru/8.1/data/core"
|
||||
xmlns:v8ui="http://v8.1c.ru/8.1/data/ui"
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<dataSource>
|
||||
<name>ИсточникДанных1</name>
|
||||
<dataSourceType>Local</dataSourceType>
|
||||
@@ -65,10 +72,10 @@
|
||||
</dcsset:selection>
|
||||
<dcsset:item xsi:type="dcsset:StructureItemGroup">
|
||||
<dcsset:order>
|
||||
<dcsset:item xsi:type="dcsset:OrderItemAuto" />
|
||||
<dcsset:item xsi:type="dcsset:OrderItemAuto"/>
|
||||
</dcsset:order>
|
||||
<dcsset:selection>
|
||||
<dcsset:item xsi:type="dcsset:SelectedItemAuto" />
|
||||
<dcsset:item xsi:type="dcsset:SelectedItemAuto"/>
|
||||
</dcsset:selection>
|
||||
</dcsset:item>
|
||||
</dcsset:settings>
|
||||
|
||||
+10
-3
@@ -1,5 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<DataCompositionSchema xmlns="http://v8.1c.ru/8.1/data-composition-system/schema" xmlns:dcscom="http://v8.1c.ru/8.1/data-composition-system/common" xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core" xmlns:dcsset="http://v8.1c.ru/8.1/data-composition-system/settings" xmlns:v8="http://v8.1c.ru/8.1/data/core" xmlns:v8ui="http://v8.1c.ru/8.1/data/ui" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<DataCompositionSchema xmlns="http://v8.1c.ru/8.1/data-composition-system/schema"
|
||||
xmlns:dcscom="http://v8.1c.ru/8.1/data-composition-system/common"
|
||||
xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core"
|
||||
xmlns:dcsset="http://v8.1c.ru/8.1/data-composition-system/settings"
|
||||
xmlns:v8="http://v8.1c.ru/8.1/data/core"
|
||||
xmlns:v8ui="http://v8.1c.ru/8.1/data/ui"
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<dataSource>
|
||||
<name>ИсточникДанных1</name>
|
||||
<dataSourceType>Local</dataSourceType>
|
||||
@@ -64,10 +71,10 @@
|
||||
</dcsset:item>
|
||||
</dcsset:groupItems>
|
||||
<dcsset:order>
|
||||
<dcsset:item xsi:type="dcsset:OrderItemAuto" />
|
||||
<dcsset:item xsi:type="dcsset:OrderItemAuto"/>
|
||||
</dcsset:order>
|
||||
<dcsset:selection>
|
||||
<dcsset:item xsi:type="dcsset:SelectedItemAuto" />
|
||||
<dcsset:item xsi:type="dcsset:SelectedItemAuto"/>
|
||||
<dcsset:item xsi:type="dcsset:SelectedItemField">
|
||||
<dcsset:field>Счет</dcsset:field>
|
||||
</dcsset:item>
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<DataCompositionSchema xmlns="http://v8.1c.ru/8.1/data-composition-system/schema" xmlns:dcscom="http://v8.1c.ru/8.1/data-composition-system/common" xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core" xmlns:dcsset="http://v8.1c.ru/8.1/data-composition-system/settings" xmlns:v8="http://v8.1c.ru/8.1/data/core" xmlns:v8ui="http://v8.1c.ru/8.1/data/ui" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<DataCompositionSchema xmlns="http://v8.1c.ru/8.1/data-composition-system/schema"
|
||||
xmlns:dcscom="http://v8.1c.ru/8.1/data-composition-system/common"
|
||||
xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core"
|
||||
xmlns:dcsset="http://v8.1c.ru/8.1/data-composition-system/settings"
|
||||
xmlns:v8="http://v8.1c.ru/8.1/data/core"
|
||||
xmlns:v8ui="http://v8.1c.ru/8.1/data/ui"
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<dataSource>
|
||||
<name>ИсточникДанных1</name>
|
||||
<dataSourceType>Local</dataSourceType>
|
||||
@@ -44,10 +51,10 @@
|
||||
</dcsset:selection>
|
||||
<dcsset:item xsi:type="dcsset:StructureItemGroup">
|
||||
<dcsset:order>
|
||||
<dcsset:item xsi:type="dcsset:OrderItemAuto" />
|
||||
<dcsset:item xsi:type="dcsset:OrderItemAuto"/>
|
||||
</dcsset:order>
|
||||
<dcsset:selection>
|
||||
<dcsset:item xsi:type="dcsset:SelectedItemAuto" />
|
||||
<dcsset:item xsi:type="dcsset:SelectedItemAuto"/>
|
||||
</dcsset:selection>
|
||||
</dcsset:item>
|
||||
</dcsset:settings>
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<DataCompositionSchema xmlns="http://v8.1c.ru/8.1/data-composition-system/schema" xmlns:dcscom="http://v8.1c.ru/8.1/data-composition-system/common" xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core" xmlns:dcsset="http://v8.1c.ru/8.1/data-composition-system/settings" xmlns:v8="http://v8.1c.ru/8.1/data/core" xmlns:v8ui="http://v8.1c.ru/8.1/data/ui" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<DataCompositionSchema xmlns="http://v8.1c.ru/8.1/data-composition-system/schema"
|
||||
xmlns:dcscom="http://v8.1c.ru/8.1/data-composition-system/common"
|
||||
xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core"
|
||||
xmlns:dcsset="http://v8.1c.ru/8.1/data-composition-system/settings"
|
||||
xmlns:v8="http://v8.1c.ru/8.1/data/core"
|
||||
xmlns:v8ui="http://v8.1c.ru/8.1/data/ui"
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<dataSource>
|
||||
<name>ИсточникДанных1</name>
|
||||
<dataSourceType>Local</dataSourceType>
|
||||
@@ -33,10 +40,10 @@
|
||||
</dcsset:selection>
|
||||
<dcsset:item xsi:type="dcsset:StructureItemGroup">
|
||||
<dcsset:order>
|
||||
<dcsset:item xsi:type="dcsset:OrderItemAuto" />
|
||||
<dcsset:item xsi:type="dcsset:OrderItemAuto"/>
|
||||
</dcsset:order>
|
||||
<dcsset:selection>
|
||||
<dcsset:item xsi:type="dcsset:SelectedItemAuto" />
|
||||
<dcsset:item xsi:type="dcsset:SelectedItemAuto"/>
|
||||
</dcsset:selection>
|
||||
</dcsset:item>
|
||||
</dcsset:settings>
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<DataCompositionSchema xmlns="http://v8.1c.ru/8.1/data-composition-system/schema" xmlns:dcscom="http://v8.1c.ru/8.1/data-composition-system/common" xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core" xmlns:dcsset="http://v8.1c.ru/8.1/data-composition-system/settings" xmlns:v8="http://v8.1c.ru/8.1/data/core" xmlns:v8ui="http://v8.1c.ru/8.1/data/ui" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<DataCompositionSchema xmlns="http://v8.1c.ru/8.1/data-composition-system/schema"
|
||||
xmlns:dcscom="http://v8.1c.ru/8.1/data-composition-system/common"
|
||||
xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core"
|
||||
xmlns:dcsset="http://v8.1c.ru/8.1/data-composition-system/settings"
|
||||
xmlns:v8="http://v8.1c.ru/8.1/data/core"
|
||||
xmlns:v8ui="http://v8.1c.ru/8.1/data/ui"
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<dataSource>
|
||||
<name>ИсточникДанных1</name>
|
||||
<dataSourceType>Local</dataSourceType>
|
||||
@@ -26,10 +33,10 @@
|
||||
</dcsset:selection>
|
||||
<dcsset:item xsi:type="dcsset:StructureItemGroup">
|
||||
<dcsset:order>
|
||||
<dcsset:item xsi:type="dcsset:OrderItemAuto" />
|
||||
<dcsset:item xsi:type="dcsset:OrderItemAuto"/>
|
||||
</dcsset:order>
|
||||
<dcsset:selection>
|
||||
<dcsset:item xsi:type="dcsset:SelectedItemAuto" />
|
||||
<dcsset:item xsi:type="dcsset:SelectedItemAuto"/>
|
||||
</dcsset:selection>
|
||||
</dcsset:item>
|
||||
</dcsset:settings>
|
||||
|
||||
@@ -0,0 +1,96 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<DataCompositionSchema xmlns="http://v8.1c.ru/8.1/data-composition-system/schema"
|
||||
xmlns:dcscom="http://v8.1c.ru/8.1/data-composition-system/common"
|
||||
xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core"
|
||||
xmlns:dcsset="http://v8.1c.ru/8.1/data-composition-system/settings"
|
||||
xmlns:v8="http://v8.1c.ru/8.1/data/core"
|
||||
xmlns:v8ui="http://v8.1c.ru/8.1/data/ui"
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<dataSource>
|
||||
<name>ИсточникДанных1</name>
|
||||
<dataSourceType>Local</dataSourceType>
|
||||
</dataSource>
|
||||
<dataSet xsi:type="DataSetQuery">
|
||||
<name>DS</name>
|
||||
<field xsi:type="DataSetFieldField">
|
||||
<dataPath>Контрагент</dataPath>
|
||||
<field>Контрагент</field>
|
||||
<title xsi:type="v8:LocalStringType">
|
||||
<v8:item>
|
||||
<v8:lang>ru</v8:lang>
|
||||
<v8:content>Имя контрагента</v8:content>
|
||||
</v8:item>
|
||||
<v8:item>
|
||||
<v8:lang>en</v8:lang>
|
||||
<v8:content>Counterparty</v8:content>
|
||||
</v8:item>
|
||||
</title>
|
||||
<role>
|
||||
<dcscom:dimension>true</dcscom:dimension>
|
||||
</role>
|
||||
<valueType>
|
||||
<v8:Type>xs:string</v8:Type>
|
||||
<v8:StringQualifiers>
|
||||
<v8:Length>100</v8:Length>
|
||||
<v8:AllowedLength>Variable</v8:AllowedLength>
|
||||
</v8:StringQualifiers>
|
||||
</valueType>
|
||||
<appearance>
|
||||
<dcscor:item xsi:type="dcsset:SettingsParameterValue">
|
||||
<dcscor:parameter>Формат</dcscor:parameter>
|
||||
<dcscor:value xsi:type="v8:LocalStringType">
|
||||
<v8:item>
|
||||
<v8:lang>ru</v8:lang>
|
||||
<v8:content>ЧДЦ=2</v8:content>
|
||||
</v8:item>
|
||||
<v8:item>
|
||||
<v8:lang>en</v8:lang>
|
||||
<v8:content>NFD=2</v8:content>
|
||||
</v8:item>
|
||||
</dcscor:value>
|
||||
</dcscor:item>
|
||||
</appearance>
|
||||
</field>
|
||||
<dataSource>ИсточникДанных1</dataSource>
|
||||
<query>ВЫБРАТЬ 1 КАК Контрагент</query>
|
||||
</dataSet>
|
||||
<parameter>
|
||||
<name>Период</name>
|
||||
<title xsi:type="v8:LocalStringType">
|
||||
<v8:item>
|
||||
<v8:lang>ru</v8:lang>
|
||||
<v8:content>Период</v8:content>
|
||||
</v8:item>
|
||||
<v8:item>
|
||||
<v8:lang>en</v8:lang>
|
||||
<v8:content>Period</v8:content>
|
||||
</v8:item>
|
||||
</title>
|
||||
<valueType>
|
||||
<v8:Type>xs:dateTime</v8:Type>
|
||||
<v8:DateQualifiers>
|
||||
<v8:DateFractions>DateTime</v8:DateFractions>
|
||||
</v8:DateQualifiers>
|
||||
</valueType>
|
||||
</parameter>
|
||||
<settingsVariant>
|
||||
<dcsset:name>Основной</dcsset:name>
|
||||
<dcsset:presentation xsi:type="v8:LocalStringType">
|
||||
<v8:item>
|
||||
<v8:lang>ru</v8:lang>
|
||||
<v8:content>Основной</v8:content>
|
||||
</v8:item>
|
||||
</dcsset:presentation>
|
||||
<dcsset:settings xmlns:style="http://v8.1c.ru/8.1/data/ui/style" xmlns:sys="http://v8.1c.ru/8.1/data/ui/fonts/system" xmlns:web="http://v8.1c.ru/8.1/data/ui/colors/web" xmlns:win="http://v8.1c.ru/8.1/data/ui/colors/windows">
|
||||
<dcsset:item xsi:type="dcsset:StructureItemGroup">
|
||||
<dcsset:order>
|
||||
<dcsset:item xsi:type="dcsset:OrderItemAuto"/>
|
||||
</dcsset:order>
|
||||
<dcsset:selection>
|
||||
<dcsset:item xsi:type="dcsset:SelectedItemAuto"/>
|
||||
</dcsset:selection>
|
||||
</dcsset:item>
|
||||
</dcsset:settings>
|
||||
</settingsVariant>
|
||||
</DataCompositionSchema>
|
||||
+96
@@ -0,0 +1,96 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<DataCompositionSchema xmlns="http://v8.1c.ru/8.1/data-composition-system/schema"
|
||||
xmlns:dcscom="http://v8.1c.ru/8.1/data-composition-system/common"
|
||||
xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core"
|
||||
xmlns:dcsset="http://v8.1c.ru/8.1/data-composition-system/settings"
|
||||
xmlns:v8="http://v8.1c.ru/8.1/data/core"
|
||||
xmlns:v8ui="http://v8.1c.ru/8.1/data/ui"
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<dataSource>
|
||||
<name>ИсточникДанных1</name>
|
||||
<dataSourceType>Local</dataSourceType>
|
||||
</dataSource>
|
||||
<dataSet xsi:type="DataSetQuery">
|
||||
<name>DS</name>
|
||||
<field xsi:type="DataSetFieldField">
|
||||
<dataPath>Контрагент</dataPath>
|
||||
<field>Контрагент</field>
|
||||
<title xsi:type="v8:LocalStringType">
|
||||
<v8:item>
|
||||
<v8:lang>ru</v8:lang>
|
||||
<v8:content>Контрагент</v8:content>
|
||||
</v8:item>
|
||||
<v8:item>
|
||||
<v8:lang>en</v8:lang>
|
||||
<v8:content>Counterparty</v8:content>
|
||||
</v8:item>
|
||||
</title>
|
||||
<role>
|
||||
<dcscom:dimension>true</dcscom:dimension>
|
||||
</role>
|
||||
<valueType>
|
||||
<v8:Type>xs:string</v8:Type>
|
||||
<v8:StringQualifiers>
|
||||
<v8:Length>100</v8:Length>
|
||||
<v8:AllowedLength>Variable</v8:AllowedLength>
|
||||
</v8:StringQualifiers>
|
||||
</valueType>
|
||||
<appearance>
|
||||
<dcscor:item xsi:type="dcsset:SettingsParameterValue">
|
||||
<dcscor:parameter>Формат</dcscor:parameter>
|
||||
<dcscor:value xsi:type="v8:LocalStringType">
|
||||
<v8:item>
|
||||
<v8:lang>ru</v8:lang>
|
||||
<v8:content>ЧДЦ=2</v8:content>
|
||||
</v8:item>
|
||||
<v8:item>
|
||||
<v8:lang>en</v8:lang>
|
||||
<v8:content>NFD=2</v8:content>
|
||||
</v8:item>
|
||||
</dcscor:value>
|
||||
</dcscor:item>
|
||||
</appearance>
|
||||
</field>
|
||||
<dataSource>ИсточникДанных1</dataSource>
|
||||
<query>ВЫБРАТЬ 1 КАК Контрагент</query>
|
||||
</dataSet>
|
||||
<parameter>
|
||||
<name>Период</name>
|
||||
<title xsi:type="v8:LocalStringType">
|
||||
<v8:item>
|
||||
<v8:lang>ru</v8:lang>
|
||||
<v8:content>Новый период</v8:content>
|
||||
</v8:item>
|
||||
<v8:item>
|
||||
<v8:lang>en</v8:lang>
|
||||
<v8:content>Period</v8:content>
|
||||
</v8:item>
|
||||
</title>
|
||||
<valueType>
|
||||
<v8:Type>xs:dateTime</v8:Type>
|
||||
<v8:DateQualifiers>
|
||||
<v8:DateFractions>DateTime</v8:DateFractions>
|
||||
</v8:DateQualifiers>
|
||||
</valueType>
|
||||
</parameter>
|
||||
<settingsVariant>
|
||||
<dcsset:name>Основной</dcsset:name>
|
||||
<dcsset:presentation xsi:type="v8:LocalStringType">
|
||||
<v8:item>
|
||||
<v8:lang>ru</v8:lang>
|
||||
<v8:content>Основной</v8:content>
|
||||
</v8:item>
|
||||
</dcsset:presentation>
|
||||
<dcsset:settings xmlns:style="http://v8.1c.ru/8.1/data/ui/style" xmlns:sys="http://v8.1c.ru/8.1/data/ui/fonts/system" xmlns:web="http://v8.1c.ru/8.1/data/ui/colors/web" xmlns:win="http://v8.1c.ru/8.1/data/ui/colors/windows">
|
||||
<dcsset:item xsi:type="dcsset:StructureItemGroup">
|
||||
<dcsset:order>
|
||||
<dcsset:item xsi:type="dcsset:OrderItemAuto"/>
|
||||
</dcsset:order>
|
||||
<dcsset:selection>
|
||||
<dcsset:item xsi:type="dcsset:SelectedItemAuto"/>
|
||||
</dcsset:selection>
|
||||
</dcsset:item>
|
||||
</dcsset:settings>
|
||||
</settingsVariant>
|
||||
</DataCompositionSchema>
|
||||
+96
@@ -0,0 +1,96 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<DataCompositionSchema xmlns="http://v8.1c.ru/8.1/data-composition-system/schema"
|
||||
xmlns:dcscom="http://v8.1c.ru/8.1/data-composition-system/common"
|
||||
xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core"
|
||||
xmlns:dcsset="http://v8.1c.ru/8.1/data-composition-system/settings"
|
||||
xmlns:v8="http://v8.1c.ru/8.1/data/core"
|
||||
xmlns:v8ui="http://v8.1c.ru/8.1/data/ui"
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<dataSource>
|
||||
<name>ИсточникДанных1</name>
|
||||
<dataSourceType>Local</dataSourceType>
|
||||
</dataSource>
|
||||
<dataSet xsi:type="DataSetQuery">
|
||||
<name>DS</name>
|
||||
<field xsi:type="DataSetFieldField">
|
||||
<dataPath>Контрагент</dataPath>
|
||||
<field>Контрагент</field>
|
||||
<title xsi:type="v8:LocalStringType">
|
||||
<v8:item>
|
||||
<v8:lang>ru</v8:lang>
|
||||
<v8:content>Контрагент</v8:content>
|
||||
</v8:item>
|
||||
<v8:item>
|
||||
<v8:lang>en</v8:lang>
|
||||
<v8:content>Counterparty</v8:content>
|
||||
</v8:item>
|
||||
</title>
|
||||
<role>
|
||||
<dcscom:dimension>true</dcscom:dimension>
|
||||
</role>
|
||||
<valueType>
|
||||
<v8:Type>xs:string</v8:Type>
|
||||
<v8:StringQualifiers>
|
||||
<v8:Length>100</v8:Length>
|
||||
<v8:AllowedLength>Variable</v8:AllowedLength>
|
||||
</v8:StringQualifiers>
|
||||
</valueType>
|
||||
<appearance>
|
||||
<dcscor:item xsi:type="dcsset:SettingsParameterValue">
|
||||
<dcscor:parameter>Формат</dcscor:parameter>
|
||||
<dcscor:value xsi:type="v8:LocalStringType">
|
||||
<v8:item>
|
||||
<v8:lang>ru</v8:lang>
|
||||
<v8:content>ЧДЦ=2</v8:content>
|
||||
</v8:item>
|
||||
<v8:item>
|
||||
<v8:lang>en</v8:lang>
|
||||
<v8:content>NFD=2</v8:content>
|
||||
</v8:item>
|
||||
</dcscor:value>
|
||||
</dcscor:item>
|
||||
</appearance>
|
||||
</field>
|
||||
<dataSource>ИсточникДанных1</dataSource>
|
||||
<query>ВЫБРАТЬ 1 КАК Контрагент</query>
|
||||
</dataSet>
|
||||
<parameter>
|
||||
<name>Период</name>
|
||||
<title xsi:type="v8:LocalStringType">
|
||||
<v8:item>
|
||||
<v8:lang>ru</v8:lang>
|
||||
<v8:content>Период</v8:content>
|
||||
</v8:item>
|
||||
<v8:item>
|
||||
<v8:lang>en</v8:lang>
|
||||
<v8:content>Period</v8:content>
|
||||
</v8:item>
|
||||
</title>
|
||||
<valueType>
|
||||
<v8:Type>xs:dateTime</v8:Type>
|
||||
<v8:DateQualifiers>
|
||||
<v8:DateFractions>DateTime</v8:DateFractions>
|
||||
</v8:DateQualifiers>
|
||||
</valueType>
|
||||
</parameter>
|
||||
<settingsVariant>
|
||||
<dcsset:name>Основной</dcsset:name>
|
||||
<dcsset:presentation xsi:type="v8:LocalStringType">
|
||||
<v8:item>
|
||||
<v8:lang>ru</v8:lang>
|
||||
<v8:content>Основной</v8:content>
|
||||
</v8:item>
|
||||
</dcsset:presentation>
|
||||
<dcsset:settings xmlns:style="http://v8.1c.ru/8.1/data/ui/style" xmlns:sys="http://v8.1c.ru/8.1/data/ui/fonts/system" xmlns:web="http://v8.1c.ru/8.1/data/ui/colors/web" xmlns:win="http://v8.1c.ru/8.1/data/ui/colors/windows">
|
||||
<dcsset:item xsi:type="dcsset:StructureItemGroup">
|
||||
<dcsset:order>
|
||||
<dcsset:item xsi:type="dcsset:OrderItemAuto"/>
|
||||
</dcsset:order>
|
||||
<dcsset:selection>
|
||||
<dcsset:item xsi:type="dcsset:SelectedItemAuto"/>
|
||||
</dcsset:selection>
|
||||
</dcsset:item>
|
||||
</dcsset:settings>
|
||||
</settingsVariant>
|
||||
</DataCompositionSchema>
|
||||
@@ -0,0 +1,63 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<DataCompositionSchema xmlns="http://v8.1c.ru/8.1/data-composition-system/schema"
|
||||
xmlns:dcscom="http://v8.1c.ru/8.1/data-composition-system/common"
|
||||
xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core"
|
||||
xmlns:dcsset="http://v8.1c.ru/8.1/data-composition-system/settings"
|
||||
xmlns:v8="http://v8.1c.ru/8.1/data/core"
|
||||
xmlns:v8ui="http://v8.1c.ru/8.1/data/ui"
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<dataSource>
|
||||
<name>ИсточникДанных1</name>
|
||||
<dataSourceType>Local</dataSourceType>
|
||||
</dataSource>
|
||||
<dataSet xsi:type="DataSetQuery">
|
||||
<name>DS</name>
|
||||
<field xsi:type="DataSetFieldField">
|
||||
<dataPath>П</dataPath>
|
||||
<field>П</field>
|
||||
</field>
|
||||
<field xsi:type="DataSetFieldField">
|
||||
<dataPath>Имя</dataPath>
|
||||
<field>Имя</field>
|
||||
</field>
|
||||
<dataSource>ИсточникДанных1</dataSource>
|
||||
<query>DS=ВЫБРАТЬ 2 КАК П, &quot;new&quot; КАК Имя</query>
|
||||
</dataSet>
|
||||
<parameter>
|
||||
<name>Период</name>
|
||||
<title xsi:type="v8:LocalStringType">
|
||||
<v8:item>
|
||||
<v8:lang>ru</v8:lang>
|
||||
<v8:content>Период</v8:content>
|
||||
</v8:item>
|
||||
</title>
|
||||
<valueType>
|
||||
<v8:Type>xs:dateTime</v8:Type>
|
||||
<v8:DateQualifiers>
|
||||
<v8:DateFractions>DateTime</v8:DateFractions>
|
||||
</v8:DateQualifiers>
|
||||
</valueType>
|
||||
</parameter>
|
||||
<settingsVariant>
|
||||
<dcsset:name>Основной</dcsset:name>
|
||||
<dcsset:presentation xsi:type="v8:LocalStringType">
|
||||
<v8:item>
|
||||
<v8:lang>ru</v8:lang>
|
||||
<v8:content>Основной</v8:content>
|
||||
</v8:item>
|
||||
</dcsset:presentation>
|
||||
<dcsset:settings xmlns:style="http://v8.1c.ru/8.1/data/ui/style" xmlns:sys="http://v8.1c.ru/8.1/data/ui/fonts/system" xmlns:web="http://v8.1c.ru/8.1/data/ui/colors/web" xmlns:win="http://v8.1c.ru/8.1/data/ui/colors/windows">
|
||||
<dcsset:selection>
|
||||
</dcsset:selection>
|
||||
<dcsset:item xsi:type="dcsset:StructureItemGroup">
|
||||
<dcsset:order>
|
||||
<dcsset:item xsi:type="dcsset:OrderItemAuto"/>
|
||||
</dcsset:order>
|
||||
<dcsset:selection>
|
||||
<dcsset:item xsi:type="dcsset:SelectedItemAuto"/>
|
||||
</dcsset:selection>
|
||||
</dcsset:item>
|
||||
</dcsset:settings>
|
||||
</settingsVariant>
|
||||
</DataCompositionSchema>
|
||||
@@ -1,5 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<DataCompositionSchema xmlns="http://v8.1c.ru/8.1/data-composition-system/schema" xmlns:dcscom="http://v8.1c.ru/8.1/data-composition-system/common" xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core" xmlns:dcsset="http://v8.1c.ru/8.1/data-composition-system/settings" xmlns:v8="http://v8.1c.ru/8.1/data/core" xmlns:v8ui="http://v8.1c.ru/8.1/data/ui" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<DataCompositionSchema xmlns="http://v8.1c.ru/8.1/data-composition-system/schema"
|
||||
xmlns:dcscom="http://v8.1c.ru/8.1/data-composition-system/common"
|
||||
xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core"
|
||||
xmlns:dcsset="http://v8.1c.ru/8.1/data-composition-system/settings"
|
||||
xmlns:v8="http://v8.1c.ru/8.1/data/core"
|
||||
xmlns:v8ui="http://v8.1c.ru/8.1/data/ui"
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<dataSource>
|
||||
<name>ИсточникДанных1</name>
|
||||
<dataSourceType>Local</dataSourceType>
|
||||
@@ -108,10 +115,10 @@
|
||||
</dcsset:dataParameters>
|
||||
<dcsset:item xsi:type="dcsset:StructureItemGroup">
|
||||
<dcsset:order>
|
||||
<dcsset:item xsi:type="dcsset:OrderItemAuto" />
|
||||
<dcsset:item xsi:type="dcsset:OrderItemAuto"/>
|
||||
</dcsset:order>
|
||||
<dcsset:selection>
|
||||
<dcsset:item xsi:type="dcsset:SelectedItemAuto" />
|
||||
<dcsset:item xsi:type="dcsset:SelectedItemAuto"/>
|
||||
</dcsset:selection>
|
||||
</dcsset:item>
|
||||
</dcsset:settings>
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<DataCompositionSchema xmlns="http://v8.1c.ru/8.1/data-composition-system/schema" xmlns:dcscom="http://v8.1c.ru/8.1/data-composition-system/common" xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core" xmlns:dcsset="http://v8.1c.ru/8.1/data-composition-system/settings" xmlns:v8="http://v8.1c.ru/8.1/data/core" xmlns:v8ui="http://v8.1c.ru/8.1/data/ui" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<DataCompositionSchema xmlns="http://v8.1c.ru/8.1/data-composition-system/schema"
|
||||
xmlns:dcscom="http://v8.1c.ru/8.1/data-composition-system/common"
|
||||
xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core"
|
||||
xmlns:dcsset="http://v8.1c.ru/8.1/data-composition-system/settings"
|
||||
xmlns:v8="http://v8.1c.ru/8.1/data/core"
|
||||
xmlns:v8ui="http://v8.1c.ru/8.1/data/ui"
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<dataSource>
|
||||
<name>ИсточникДанных1</name>
|
||||
<dataSourceType>Local</dataSourceType>
|
||||
@@ -81,10 +88,10 @@
|
||||
</dcsset:selection>
|
||||
<dcsset:item xsi:type="dcsset:StructureItemGroup">
|
||||
<dcsset:order>
|
||||
<dcsset:item xsi:type="dcsset:OrderItemAuto" />
|
||||
<dcsset:item xsi:type="dcsset:OrderItemAuto"/>
|
||||
</dcsset:order>
|
||||
<dcsset:selection>
|
||||
<dcsset:item xsi:type="dcsset:SelectedItemAuto" />
|
||||
<dcsset:item xsi:type="dcsset:SelectedItemAuto"/>
|
||||
</dcsset:selection>
|
||||
</dcsset:item>
|
||||
</dcsset:settings>
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<DataCompositionSchema xmlns="http://v8.1c.ru/8.1/data-composition-system/schema" xmlns:dcscom="http://v8.1c.ru/8.1/data-composition-system/common" xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core" xmlns:dcsset="http://v8.1c.ru/8.1/data-composition-system/settings" xmlns:v8="http://v8.1c.ru/8.1/data/core" xmlns:v8ui="http://v8.1c.ru/8.1/data/ui" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<DataCompositionSchema xmlns="http://v8.1c.ru/8.1/data-composition-system/schema"
|
||||
xmlns:dcscom="http://v8.1c.ru/8.1/data-composition-system/common"
|
||||
xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core"
|
||||
xmlns:dcsset="http://v8.1c.ru/8.1/data-composition-system/settings"
|
||||
xmlns:v8="http://v8.1c.ru/8.1/data/core"
|
||||
xmlns:v8ui="http://v8.1c.ru/8.1/data/ui"
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<dataSource>
|
||||
<name>ИсточникДанных1</name>
|
||||
<dataSourceType>Local</dataSourceType>
|
||||
@@ -39,10 +46,10 @@
|
||||
</dcsset:selection>
|
||||
<dcsset:item xsi:type="dcsset:StructureItemGroup">
|
||||
<dcsset:order>
|
||||
<dcsset:item xsi:type="dcsset:OrderItemAuto" />
|
||||
<dcsset:item xsi:type="dcsset:OrderItemAuto"/>
|
||||
</dcsset:order>
|
||||
<dcsset:selection>
|
||||
<dcsset:item xsi:type="dcsset:SelectedItemAuto" />
|
||||
<dcsset:item xsi:type="dcsset:SelectedItemAuto"/>
|
||||
</dcsset:selection>
|
||||
</dcsset:item>
|
||||
</dcsset:settings>
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<DataCompositionSchema xmlns="http://v8.1c.ru/8.1/data-composition-system/schema" xmlns:dcscom="http://v8.1c.ru/8.1/data-composition-system/common" xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core" xmlns:dcsset="http://v8.1c.ru/8.1/data-composition-system/settings" xmlns:v8="http://v8.1c.ru/8.1/data/core" xmlns:v8ui="http://v8.1c.ru/8.1/data/ui" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<DataCompositionSchema xmlns="http://v8.1c.ru/8.1/data-composition-system/schema"
|
||||
xmlns:dcscom="http://v8.1c.ru/8.1/data-composition-system/common"
|
||||
xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core"
|
||||
xmlns:dcsset="http://v8.1c.ru/8.1/data-composition-system/settings"
|
||||
xmlns:v8="http://v8.1c.ru/8.1/data/core"
|
||||
xmlns:v8ui="http://v8.1c.ru/8.1/data/ui"
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<dataSource>
|
||||
<name>ИсточникДанных1</name>
|
||||
<dataSourceType>Local</dataSourceType>
|
||||
@@ -34,10 +41,10 @@
|
||||
</dcsset:selection>
|
||||
<dcsset:item xsi:type="dcsset:StructureItemGroup">
|
||||
<dcsset:order>
|
||||
<dcsset:item xsi:type="dcsset:OrderItemAuto" />
|
||||
<dcsset:item xsi:type="dcsset:OrderItemAuto"/>
|
||||
</dcsset:order>
|
||||
<dcsset:selection>
|
||||
<dcsset:item xsi:type="dcsset:SelectedItemAuto" />
|
||||
<dcsset:item xsi:type="dcsset:SelectedItemAuto"/>
|
||||
</dcsset:selection>
|
||||
</dcsset:item>
|
||||
</dcsset:settings>
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<DataCompositionSchema xmlns="http://v8.1c.ru/8.1/data-composition-system/schema" xmlns:dcscom="http://v8.1c.ru/8.1/data-composition-system/common" xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core" xmlns:dcsset="http://v8.1c.ru/8.1/data-composition-system/settings" xmlns:v8="http://v8.1c.ru/8.1/data/core" xmlns:v8ui="http://v8.1c.ru/8.1/data/ui" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<DataCompositionSchema xmlns="http://v8.1c.ru/8.1/data-composition-system/schema"
|
||||
xmlns:dcscom="http://v8.1c.ru/8.1/data-composition-system/common"
|
||||
xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core"
|
||||
xmlns:dcsset="http://v8.1c.ru/8.1/data-composition-system/settings"
|
||||
xmlns:v8="http://v8.1c.ru/8.1/data/core"
|
||||
xmlns:v8ui="http://v8.1c.ru/8.1/data/ui"
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<dataSource>
|
||||
<name>ИсточникДанных1</name>
|
||||
<dataSourceType>Local</dataSourceType>
|
||||
@@ -26,10 +33,10 @@
|
||||
</dcsset:selection>
|
||||
<dcsset:item xsi:type="dcsset:StructureItemGroup">
|
||||
<dcsset:order>
|
||||
<dcsset:item xsi:type="dcsset:OrderItemAuto" />
|
||||
<dcsset:item xsi:type="dcsset:OrderItemAuto"/>
|
||||
</dcsset:order>
|
||||
<dcsset:selection>
|
||||
<dcsset:item xsi:type="dcsset:SelectedItemAuto" />
|
||||
<dcsset:item xsi:type="dcsset:SelectedItemAuto"/>
|
||||
</dcsset:selection>
|
||||
</dcsset:item>
|
||||
</dcsset:settings>
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<DataCompositionSchema xmlns="http://v8.1c.ru/8.1/data-composition-system/schema" xmlns:dcscom="http://v8.1c.ru/8.1/data-composition-system/common" xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core" xmlns:dcsset="http://v8.1c.ru/8.1/data-composition-system/settings" xmlns:v8="http://v8.1c.ru/8.1/data/core" xmlns:v8ui="http://v8.1c.ru/8.1/data/ui" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<DataCompositionSchema xmlns="http://v8.1c.ru/8.1/data-composition-system/schema"
|
||||
xmlns:dcscom="http://v8.1c.ru/8.1/data-composition-system/common"
|
||||
xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core"
|
||||
xmlns:dcsset="http://v8.1c.ru/8.1/data-composition-system/settings"
|
||||
xmlns:v8="http://v8.1c.ru/8.1/data/core"
|
||||
xmlns:v8ui="http://v8.1c.ru/8.1/data/ui"
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<dataSource>
|
||||
<name>ИсточникДанных1</name>
|
||||
<dataSourceType>Local</dataSourceType>
|
||||
@@ -77,10 +84,10 @@
|
||||
</dcsset:item>
|
||||
</dcsset:groupItems>
|
||||
<dcsset:order>
|
||||
<dcsset:item xsi:type="dcsset:OrderItemAuto" />
|
||||
<dcsset:item xsi:type="dcsset:OrderItemAuto"/>
|
||||
</dcsset:order>
|
||||
<dcsset:selection>
|
||||
<dcsset:item xsi:type="dcsset:SelectedItemAuto" />
|
||||
<dcsset:item xsi:type="dcsset:SelectedItemAuto"/>
|
||||
</dcsset:selection>
|
||||
</dcsset:item>
|
||||
<dcsset:selection>
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<DataCompositionSchema xmlns="http://v8.1c.ru/8.1/data-composition-system/schema" xmlns:dcscom="http://v8.1c.ru/8.1/data-composition-system/common" xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core" xmlns:dcsset="http://v8.1c.ru/8.1/data-composition-system/settings" xmlns:v8="http://v8.1c.ru/8.1/data/core" xmlns:v8ui="http://v8.1c.ru/8.1/data/ui" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<DataCompositionSchema xmlns="http://v8.1c.ru/8.1/data-composition-system/schema"
|
||||
xmlns:dcscom="http://v8.1c.ru/8.1/data-composition-system/common"
|
||||
xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core"
|
||||
xmlns:dcsset="http://v8.1c.ru/8.1/data-composition-system/settings"
|
||||
xmlns:v8="http://v8.1c.ru/8.1/data/core"
|
||||
xmlns:v8ui="http://v8.1c.ru/8.1/data/ui"
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<dataSource>
|
||||
<name>ИсточникДанных1</name>
|
||||
<dataSourceType>Local</dataSourceType>
|
||||
@@ -77,10 +84,10 @@
|
||||
</dcsset:item>
|
||||
</dcsset:groupItems>
|
||||
<dcsset:order>
|
||||
<dcsset:item xsi:type="dcsset:OrderItemAuto" />
|
||||
<dcsset:item xsi:type="dcsset:OrderItemAuto"/>
|
||||
</dcsset:order>
|
||||
<dcsset:selection>
|
||||
<dcsset:item xsi:type="dcsset:SelectedItemAuto" />
|
||||
<dcsset:item xsi:type="dcsset:SelectedItemAuto"/>
|
||||
<dcsset:item xsi:type="dcsset:SelectedItemField">
|
||||
<dcsset:field>Счет</dcsset:field>
|
||||
</dcsset:item>
|
||||
|
||||
@@ -342,6 +342,31 @@ function normalizeContent(text, config) {
|
||||
|
||||
// ─── Snapshot comparison ────────────────────────────────────────────────────
|
||||
|
||||
// Capture raw byte contents of every file in dir, keyed by relative path.
|
||||
// Used by idempotency checks to verify byte-equality after a re-run.
|
||||
function snapshotWorkDirBytes(dir) {
|
||||
const files = listFilesRecursive(dir);
|
||||
const map = new Map();
|
||||
for (const rel of files) {
|
||||
map.set(rel, readFileSync(join(dir, rel)));
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// Compare two byte-snapshots. Returns null if identical, else a list of diff lines.
|
||||
function diffByteSnapshots(before, after) {
|
||||
const diffs = [];
|
||||
for (const [rel, b1] of before) {
|
||||
if (!after.has(rel)) { diffs.push(`removed: ${rel}`); continue; }
|
||||
const b2 = after.get(rel);
|
||||
if (b1.length !== b2.length || !b1.equals(b2)) diffs.push(`changed: ${rel} (${b1.length} -> ${b2.length} bytes)`);
|
||||
}
|
||||
for (const rel of after.keys()) {
|
||||
if (!before.has(rel)) diffs.push(`added: ${rel}`);
|
||||
}
|
||||
return diffs.length === 0 ? null : diffs;
|
||||
}
|
||||
|
||||
function listFilesRecursive(dir, base = '') {
|
||||
const result = [];
|
||||
if (!existsSync(dir)) return result;
|
||||
@@ -571,6 +596,23 @@ async function runCaseAsync(testCase, opts) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Idempotency check: re-run the same script with the same args and assert
|
||||
// every file in workDir is byte-identical to the first-run output.
|
||||
if (errors.length === 0 && caseData.idempotent && !workspace.readOnly) {
|
||||
const before = snapshotWorkDirBytes(workDir);
|
||||
try {
|
||||
const execCwd = skillConfig.cwd === 'workDir' ? workDir : undefined;
|
||||
await execSkillAsync(opts.runtime, scriptPath, args, execCwd);
|
||||
} catch (e) {
|
||||
errors.push(`Idempotency rerun failed: exitCode=${e.status}\nstderr: ${(e.stderr || '').substring(0, 300)}`);
|
||||
}
|
||||
if (errors.length === 0) {
|
||||
const after = snapshotWorkDirBytes(workDir);
|
||||
const diffs = diffByteSnapshots(before, after);
|
||||
if (diffs) errors.push(`Idempotency: workspace changed on rerun:\n ${diffs.join('\n ')}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Post-run validation (on real output, before cleanup)
|
||||
@@ -727,6 +769,22 @@ function runCase(testCase, opts) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Idempotency check: re-run the same script and assert byte-equality.
|
||||
if (errors.length === 0 && caseData.idempotent && !workspace.readOnly) {
|
||||
const before = snapshotWorkDirBytes(workDir);
|
||||
try {
|
||||
const execCwd = skillConfig.cwd === 'workDir' ? workDir : undefined;
|
||||
execSkillRaw(opts.runtime, scriptPath, args, execCwd);
|
||||
} catch (e) {
|
||||
errors.push(`Idempotency rerun failed: exitCode=${e.status}\nstderr: ${(e.stderr || '').substring(0, 300)}`);
|
||||
}
|
||||
if (errors.length === 0) {
|
||||
const after = snapshotWorkDirBytes(workDir);
|
||||
const diffs = diffByteSnapshots(before, after);
|
||||
if (diffs) errors.push(`Idempotency: workspace changed on rerun:\n ${diffs.join('\n ')}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Post-run validation (on real output, before cleanup)
|
||||
|
||||
Reference in New Issue
Block a user