mirror of
https://github.com/Nikolay-Shirokov/cc-1c-skills.git
synced 2026-10-01 14:35:54 +03:00
fix(skd-validate): видимый пропуск XSD, булево без схем, корень со строчной
По итогам прогона задачи «платформа пишет: нарушен порядок» субагентом в проекте без схем: навык отвечал «Validation OK», и модель докладывала бы, что схема в порядке. - Итоговая строка говорит, что XSD-проверка не выполнялась и почему: «XSD not checked: no schemas (/v8-xsd-fetch)» / «template outside a dump». - xs:boolean только true/false/1/0 — собственная проверка значений, без схем; в XSD-проходе та же ошибка второй раз не выводится. - Корень dataCompositionSchema (строчная): PS молча пропускал (-ne без регистра), py считал ошибкой. Платформа такой файл загружает, а конфигуратор пишет DataCompositionSchema — теперь предупреждение в обоих портах. Фикстура drilldown-base приведена к виду конфигуратора. - SKILL.md: когда скачивать схемы, как читать подсказки, когда нарушение — дефект навыка. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018dc2yLQfw6wppbopM1Y4Ps
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
21ebd814de
commit
292b6c97de
@@ -31,9 +31,10 @@ powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/skd-validate.ps1" -
|
|||||||
|
|
||||||
## Проверка по XSD
|
## Проверка по XSD
|
||||||
|
|
||||||
Если в проекте есть XSD-схемы платформы (`/v8-xsd-fetch`), дополнительно проверяет порядок элементов, типы и значения по схеме версии формата выгрузки. Строки вида `XSD 2.20, line N: <родитель>/<элемент>: …`:
|
Порядок элементов, типы и значения дополнительно сверяются с XSD-схемами платформы, если они скачаны в проект. Иначе итоговая строка заканчивается на `XSD not checked: <причина>` — это не «проверено всё». Когда проверка нужна (например, платформа пишет «нарушен порядок следования»), скачай схемы версии формата выгрузки — атрибут `version` в `Configuration.xml` — через `/v8-xsd-fetch -Versions <версия>` и запусти снова. То же при `[WARN] XSD: no schemas for format <версия>`.
|
||||||
|
|
||||||
- `must come before <X>` — элемент не на своём месте: перенести его перед `<X>`, содержимое не менять. `duplicate` — лишний повтор. `not allowed in <P>` — в этом месте такого элемента быть не должно. Остальное — недопустимое значение, текст говорит какое.
|
Нарушение: `XSD <версия>, line N: <родитель>/<элемент>: <что не так>`.
|
||||||
- `[ERROR]` — по схемам своей версии формата. `[WARN]` с `(no schemas for X)` — по более новой версии, ориентир, а не окончательный вердикт.
|
|
||||||
- Шаблон собран `/skd-compile` или изменён `/skd-edit` — нарушение означает дефект навыка: сообщи пользователю, а не правь XML вручную молча.
|
- `must come before <X>` — перенеси элемент непосредственно перед `<X>`, содержимое не меняй. `duplicate` — удали повтор. `not allowed in <P>` — элементу здесь не место. Иначе — текст о недопустимом значении.
|
||||||
- `no schemas for format X — not checked` — предложи `/v8-xsd-fetch -Versions X`.
|
- `[WARN]` с `(no schemas for <версия>)` — сверено по схемам более новой версии: ориентир, не вердикт.
|
||||||
|
- Если шаблон ты только что собрал или изменил `/skd-compile` или `/skd-edit`, нарушение — дефект навыка: сообщи о нём пользователю.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# skd-validate v1.6 — Validate 1C DCS structure
|
# skd-validate v1.7 — Validate 1C DCS structure
|
||||||
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
|
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
|
||||||
[CmdletBinding(PositionalBinding=$false)]
|
[CmdletBinding(PositionalBinding=$false)]
|
||||||
param(
|
param(
|
||||||
@@ -55,6 +55,9 @@ $script:errors = 0
|
|||||||
$script:warnings = 0
|
$script:warnings = 0
|
||||||
$script:okCount = 0
|
$script:okCount = 0
|
||||||
$script:stopped = $false
|
$script:stopped = $false
|
||||||
|
# Проверка, которая не выполнялась, — в итоговую строку: без этого «Validation OK» читается как
|
||||||
|
# «проверено всё» (модель так и докладывала пользователю при нарушенном порядке)
|
||||||
|
$script:xsdNote = $null
|
||||||
$script:output = New-Object System.Text.StringBuilder 4096
|
$script:output = New-Object System.Text.StringBuilder 4096
|
||||||
|
|
||||||
function Out-Line {
|
function Out-Line {
|
||||||
@@ -86,10 +89,12 @@ function Report-Warn {
|
|||||||
$finalize = {
|
$finalize = {
|
||||||
$checks = $script:okCount + $script:errors + $script:warnings
|
$checks = $script:okCount + $script:errors + $script:warnings
|
||||||
if ($script:errors -eq 0 -and $script:warnings -eq 0 -and -not $Detailed) {
|
if ($script:errors -eq 0 -and $script:warnings -eq 0 -and -not $Detailed) {
|
||||||
$result = "=== Validation OK: $fileName ($checks checks) ==="
|
$note = if ($script:xsdNote) { "; $($script:xsdNote)" } else { "" }
|
||||||
|
$result = "=== Validation OK: $fileName ($checks checks$note) ==="
|
||||||
} else {
|
} else {
|
||||||
Out-Line ""
|
Out-Line ""
|
||||||
Out-Line "=== Result: $($script:errors) errors, $($script:warnings) warnings ($checks checks) ==="
|
$note = if ($script:xsdNote) { "; $($script:xsdNote)" } else { "" }
|
||||||
|
Out-Line "=== Result: $($script:errors) errors, $($script:warnings) warnings ($checks checks$note) ==="
|
||||||
$result = $script:output.ToString()
|
$result = $script:output.ToString()
|
||||||
}
|
}
|
||||||
Write-Host $result
|
Write-Host $result
|
||||||
@@ -141,10 +146,15 @@ $root = $xmlDoc.DocumentElement
|
|||||||
|
|
||||||
# --- 3. Root element checks ---
|
# --- 3. Root element checks ---
|
||||||
|
|
||||||
if ($root.LocalName -ne "DataCompositionSchema") {
|
# Регистр значим: -ne его не различает, и корень со строчной пропускался молча. Строчную
|
||||||
Report-Error "Root element is '$($root.LocalName)', expected 'DataCompositionSchema'"
|
# (dataCompositionSchema — имя из XSD, так пишет сериализатор XDTO) платформа загружает, но
|
||||||
} else {
|
# конфигуратор всегда пишет DataCompositionSchema — это предупреждение, не ошибка.
|
||||||
|
if ($root.LocalName -ceq "DataCompositionSchema") {
|
||||||
Report-OK "Root element: DataCompositionSchema"
|
Report-OK "Root element: DataCompositionSchema"
|
||||||
|
} elseif ($root.LocalName -eq "DataCompositionSchema") {
|
||||||
|
Report-Warn "Root element is '$($root.LocalName)' — the platform loads it, but the Designer writes 'DataCompositionSchema'"
|
||||||
|
} else {
|
||||||
|
Report-Error "Root element is '$($root.LocalName)', expected 'DataCompositionSchema'"
|
||||||
}
|
}
|
||||||
|
|
||||||
$expectedNs = "http://v8.1c.ru/8.1/data-composition-system/schema"
|
$expectedNs = "http://v8.1c.ru/8.1/data-composition-system/schema"
|
||||||
@@ -918,6 +928,10 @@ foreach ($vn in $valueNodes) {
|
|||||||
} elseif (-not ($text -match '^[A-Za-zА-Яа-яЁё]+\.[A-Za-zА-Яа-яЁё0-9_]+')) {
|
} elseif (-not ($text -match '^[A-Za-zА-Яа-яЁё]+\.[A-Za-zА-Яа-яЁё0-9_]+')) {
|
||||||
Report-Warn "<value xsi:type=`"dcscor:DesignTimeValue`">$text</value> — doesn't look like a typical ref path"
|
Report-Warn "<value xsi:type=`"dcscor:DesignTimeValue`">$text</value> — doesn't look like a typical ref path"
|
||||||
}
|
}
|
||||||
|
} elseif ($xsiType -ceq 'xs:boolean' -and @('true', 'false', '1', '0') -cnotcontains $text.Trim()) {
|
||||||
|
# Платформа прощает True/False, чтение по схеме (XDTO) — нет
|
||||||
|
Report-Error "<value xsi:type=`"xs:boolean`">$text</value> — boolean must be true or false (lowercase)"
|
||||||
|
$vOk = $false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($vChecked -gt 0 -and $vOk) {
|
if ($vChecked -gt 0 -and $vOk) {
|
||||||
@@ -1191,10 +1205,10 @@ function Compress-XsdMessage([string]$m) {
|
|||||||
|
|
||||||
function Invoke-XsdCheck {
|
function Invoke-XsdCheck {
|
||||||
$xsdRoot = Resolve-XsdRoot ([System.IO.Path]::GetDirectoryName($resolvedPath))
|
$xsdRoot = Resolve-XsdRoot ([System.IO.Path]::GetDirectoryName($resolvedPath))
|
||||||
if (-not $xsdRoot) { Report-OK "XSD: no schemas in project — not checked"; return }
|
if (-not $xsdRoot) { $script:xsdNote = "XSD not checked: no schemas (/v8-xsd-fetch)"; return }
|
||||||
$anchor = Find-DumpAnchor ([System.IO.Path]::GetDirectoryName($resolvedPath))
|
$anchor = Find-DumpAnchor ([System.IO.Path]::GetDirectoryName($resolvedPath))
|
||||||
$ver = if ($anchor) { Get-RootVersion $anchor } else { $null }
|
$ver = if ($anchor) { Get-RootVersion $anchor } else { $null }
|
||||||
if (-not $ver -or (Get-FormatRank $ver) -eq 0) { Report-OK "XSD: format version unknown (template outside a dump) — not checked"; return }
|
if (-not $ver -or (Get-FormatRank $ver) -eq 0) { $script:xsdNote = "XSD not checked: template outside a dump"; return }
|
||||||
|
|
||||||
# Точная версия — ошибки; ближайшая более новая — предупреждения; только старше — пропуск
|
# Точная версия — ошибки; ближайшая более новая — предупреждения; только старше — пропуск
|
||||||
$cands = @(Get-ChildItem -LiteralPath $xsdRoot -Directory |
|
$cands = @(Get-ChildItem -LiteralPath $xsdRoot -Directory |
|
||||||
@@ -1264,6 +1278,8 @@ function Invoke-XsdCheck {
|
|||||||
$info = @{ elem = $top.name; parent = $(if ($st.Count -gt 1) { $st[$st.Count - 2].name } else { '' }); xsiNs = $top.xsiNs; xsiLocal = $top.xsiLocal }
|
$info = @{ elem = $top.name; parent = $(if ($st.Count -gt 1) { $st[$st.Count - 2].name } else { '' }); xsiNs = $top.xsiNs; xsiLocal = $top.xsiLocal }
|
||||||
}
|
}
|
||||||
if (Test-XsdPlatformNoise $info) { return }
|
if (Test-XsdPlatformNoise $info) { return }
|
||||||
|
# Недопустимое булево значение уже сообщила собственная проверка значений (раздел 17)
|
||||||
|
if ($info.elem -ceq 'value' -and $info.xsiNs -ceq 'http://www.w3.org/2001/XMLSchema' -and $info.xsiLocal -ceq 'boolean') { return }
|
||||||
$script:xsdFound++
|
$script:xsdFound++
|
||||||
$hint = $null
|
$hint = $null
|
||||||
if ($sender.NodeType -eq 'Element') {
|
if ($sender.NodeType -eq 'Element') {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# skd-validate v1.6 — Validate 1C DCS structure (Python port)
|
# skd-validate v1.7 — Validate 1C DCS structure (Python port)
|
||||||
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
|
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
|
||||||
import argparse
|
import argparse
|
||||||
import os
|
import os
|
||||||
@@ -78,6 +78,9 @@ errors = 0
|
|||||||
warnings = 0
|
warnings = 0
|
||||||
ok_count = 0
|
ok_count = 0
|
||||||
stopped = False
|
stopped = False
|
||||||
|
# Проверка, которая не выполнялась, — в итоговую строку: без этого «Validation OK» читается как
|
||||||
|
# «проверено всё» (модель так и докладывала пользователю при нарушенном порядке)
|
||||||
|
xsd_note = None
|
||||||
output_lines = []
|
output_lines = []
|
||||||
|
|
||||||
|
|
||||||
@@ -109,10 +112,12 @@ def report_warn(msg):
|
|||||||
def finalize():
|
def finalize():
|
||||||
checks = ok_count + errors + warnings
|
checks = ok_count + errors + warnings
|
||||||
if errors == 0 and warnings == 0 and not detailed:
|
if errors == 0 and warnings == 0 and not detailed:
|
||||||
result = f"=== Validation OK: {file_name} ({checks} checks) ==="
|
note = f"; {xsd_note}" if xsd_note else ""
|
||||||
|
result = f"=== Validation OK: {file_name} ({checks} checks{note}) ==="
|
||||||
else:
|
else:
|
||||||
out_line("")
|
out_line("")
|
||||||
out_line(f"=== Result: {errors} errors, {warnings} warnings ({checks} checks) ===")
|
note = f"; {xsd_note}" if xsd_note else ""
|
||||||
|
out_line(f"=== Result: {errors} errors, {warnings} warnings ({checks} checks{note}) ===")
|
||||||
result = "\n".join(output_lines)
|
result = "\n".join(output_lines)
|
||||||
print(result)
|
print(result)
|
||||||
if out_file:
|
if out_file:
|
||||||
@@ -187,10 +192,14 @@ def inner_text(node):
|
|||||||
|
|
||||||
# ── 3. Root element checks ───────────────────────────────────
|
# ── 3. Root element checks ───────────────────────────────────
|
||||||
|
|
||||||
if local_name(root) != "DataCompositionSchema":
|
# Строчную (dataCompositionSchema — имя из XSD, так пишет сериализатор XDTO) платформа загружает,
|
||||||
report_error(f"Root element is '{local_name(root)}', expected 'DataCompositionSchema'")
|
# но конфигуратор всегда пишет DataCompositionSchema — это предупреждение, не ошибка.
|
||||||
else:
|
if local_name(root) == "DataCompositionSchema":
|
||||||
report_ok("Root element: DataCompositionSchema")
|
report_ok("Root element: DataCompositionSchema")
|
||||||
|
elif local_name(root).lower() == "datacompositionschema":
|
||||||
|
report_warn(f"Root element is '{local_name(root)}' — the platform loads it, but the Designer writes 'DataCompositionSchema'")
|
||||||
|
else:
|
||||||
|
report_error(f"Root element is '{local_name(root)}', expected 'DataCompositionSchema'")
|
||||||
|
|
||||||
expected_ns = "http://v8.1c.ru/8.1/data-composition-system/schema"
|
expected_ns = "http://v8.1c.ru/8.1/data-composition-system/schema"
|
||||||
root_ns = etree.QName(root.tag).namespace or ""
|
root_ns = etree.QName(root.tag).namespace or ""
|
||||||
@@ -877,6 +886,10 @@ for vn in value_nodes:
|
|||||||
v_ok = False
|
v_ok = False
|
||||||
elif not _re_vt.match(r'^[A-Za-zА-Яа-яЁё]+\.[A-Za-zА-Яа-яЁё0-9_]+', stripped):
|
elif not _re_vt.match(r'^[A-Za-zА-Яа-яЁё]+\.[A-Za-zА-Яа-яЁё0-9_]+', stripped):
|
||||||
report_warn(f"<value xsi:type=\"dcscor:DesignTimeValue\">{text}</value> — doesn't look like a typical ref path")
|
report_warn(f"<value xsi:type=\"dcscor:DesignTimeValue\">{text}</value> — doesn't look like a typical ref path")
|
||||||
|
elif xsi_type == 'xs:boolean' and text.strip() not in ('true', 'false', '1', '0'):
|
||||||
|
# Платформа прощает True/False, чтение по схеме (XDTO) — нет
|
||||||
|
report_error(f"<value xsi:type=\"xs:boolean\">{text}</value> — boolean must be true or false (lowercase)")
|
||||||
|
v_ok = False
|
||||||
|
|
||||||
if v_checked > 0 and v_ok:
|
if v_checked > 0 and v_ok:
|
||||||
report_ok(f"{v_checked} <value> element(s) with xsi:type: content OK")
|
report_ok(f"{v_checked} <value> element(s) with xsi:type: content OK")
|
||||||
@@ -1289,13 +1302,14 @@ def compress_xsd_message(m):
|
|||||||
|
|
||||||
def xsd_check():
|
def xsd_check():
|
||||||
xsd_root = resolve_xsd_root(os.path.dirname(resolved_path))
|
xsd_root = resolve_xsd_root(os.path.dirname(resolved_path))
|
||||||
|
global xsd_note
|
||||||
if not xsd_root:
|
if not xsd_root:
|
||||||
report_ok("XSD: no schemas in project — not checked")
|
xsd_note = "XSD not checked: no schemas (/v8-xsd-fetch)"
|
||||||
return
|
return
|
||||||
anchor = find_dump_anchor(os.path.dirname(resolved_path))
|
anchor = find_dump_anchor(os.path.dirname(resolved_path))
|
||||||
ver = root_version(anchor) if anchor else None
|
ver = root_version(anchor) if anchor else None
|
||||||
if not ver or format_rank(ver) == 0:
|
if not ver or format_rank(ver) == 0:
|
||||||
report_ok("XSD: format version unknown (template outside a dump) — not checked")
|
xsd_note = "XSD not checked: template outside a dump"
|
||||||
return
|
return
|
||||||
|
|
||||||
# Точная версия — ошибки; ближайшая более новая — предупреждения; только старше — пропуск
|
# Точная версия — ошибки; ближайшая более новая — предупреждения; только старше — пропуск
|
||||||
@@ -1331,6 +1345,9 @@ def xsd_check():
|
|||||||
info = _xsd_elem_info(el)
|
info = _xsd_elem_info(el)
|
||||||
if xsd_platform_noise(info):
|
if xsd_platform_noise(info):
|
||||||
continue
|
continue
|
||||||
|
# Недопустимое булево значение уже сообщила собственная проверка значений (раздел 17)
|
||||||
|
if info["elem"] == "value" and info["xsiNs"] == XS_NS and info["xsiLocal"] == "boolean":
|
||||||
|
continue
|
||||||
found += 1
|
found += 1
|
||||||
hint = None
|
hint = None
|
||||||
# «Лишний/не на месте» у libxml2 — «This element is not expected» (текст не локализуется)
|
# «Лишний/не на месте» у libxml2 — «This element is not expected» (текст не локализуется)
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<dataCompositionSchema xmlns="http://v8.1c.ru/8.1/data-composition-system/schema" xmlns:dcsset="http://v8.1c.ru/8.1/data-composition-system/settings" xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core" 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:dcsset="http://v8.1c.ru/8.1/data-composition-system/settings" xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core" 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>
|
<dataSource>
|
||||||
<name>Источник</name>
|
<name>Источник</name>
|
||||||
<dataSourceType>Local</dataSourceType>
|
<dataSourceType>Local</dataSourceType>
|
||||||
@@ -94,4 +94,4 @@
|
|||||||
<dcsset:name>Основной</dcsset:name>
|
<dcsset:name>Основной</dcsset:name>
|
||||||
<dcsset:settings />
|
<dcsset:settings />
|
||||||
</settingsVariant>
|
</settingsVariant>
|
||||||
</dataCompositionSchema>
|
</DataCompositionSchema>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<dataCompositionSchema xmlns="http://v8.1c.ru/8.1/data-composition-system/schema" xmlns:dcsset="http://v8.1c.ru/8.1/data-composition-system/settings" xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core" 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:dcsset="http://v8.1c.ru/8.1/data-composition-system/settings" xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core" 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>
|
<dataSource>
|
||||||
<name>Источник</name>
|
<name>Источник</name>
|
||||||
<dataSourceType>Local</dataSourceType>
|
<dataSourceType>Local</dataSourceType>
|
||||||
@@ -118,4 +118,4 @@
|
|||||||
<dcsset:name>Основной</dcsset:name>
|
<dcsset:name>Основной</dcsset:name>
|
||||||
<dcsset:settings />
|
<dcsset:settings />
|
||||||
</settingsVariant>
|
</settingsVariant>
|
||||||
</dataCompositionSchema>
|
</DataCompositionSchema>
|
||||||
|
|||||||
@@ -0,0 +1,22 @@
|
|||||||
|
{
|
||||||
|
"name": "Булево True/False без схем — ловит собственная проверка значений",
|
||||||
|
"setup": "fixture:xsd-bad-220",
|
||||||
|
"preRun": [
|
||||||
|
{
|
||||||
|
"writeFile": {
|
||||||
|
"path": ".v8-project.json",
|
||||||
|
"content": {
|
||||||
|
"xsdPath": "нет-такого-каталога"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"params": {
|
||||||
|
"templatePath": "Reports/Отчет/Templates/Схема/Ext/Template.xml"
|
||||||
|
},
|
||||||
|
"expect": {
|
||||||
|
"stdoutContains": "<value xsi:type=\"xs:boolean\">False</value> — boolean must be true or false (lowercase)"
|
||||||
|
},
|
||||||
|
"noSnapshot": "результат — только вывод",
|
||||||
|
"expectError": true
|
||||||
|
}
|
||||||
@@ -0,0 +1,97 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<dataCompositionSchema xmlns="http://v8.1c.ru/8.1/data-composition-system/schema" xmlns:dcsset="http://v8.1c.ru/8.1/data-composition-system/settings" xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core" 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>Источник</name>
|
||||||
|
<dataSourceType>Local</dataSourceType>
|
||||||
|
</dataSource>
|
||||||
|
<dataSet xsi:type="DataSetQuery">
|
||||||
|
<name>Основной</name>
|
||||||
|
<field xsi:type="DataSetFieldField">
|
||||||
|
<dataPath>Ресурс1</dataPath>
|
||||||
|
<field>Ресурс1</field>
|
||||||
|
</field>
|
||||||
|
<field xsi:type="DataSetFieldField">
|
||||||
|
<dataPath>Ресурс2</dataPath>
|
||||||
|
<field>Ресурс2</field>
|
||||||
|
</field>
|
||||||
|
<field xsi:type="DataSetFieldField">
|
||||||
|
<dataPath>Счет</dataPath>
|
||||||
|
<field>Счет</field>
|
||||||
|
</field>
|
||||||
|
<dataSource>Источник</dataSource>
|
||||||
|
<query>ВЫБРАТЬ 1</query>
|
||||||
|
</dataSet>
|
||||||
|
<template>
|
||||||
|
<name>Макет1</name>
|
||||||
|
<template xmlns:dcsat="http://v8.1c.ru/8.1/data-composition-system/area-template" xsi:type="dcsat:AreaTemplate">
|
||||||
|
<dcsat:item xsi:type="dcsat:TableRow">
|
||||||
|
<dcsat:tableCell>
|
||||||
|
<dcsat:item xsi:type="dcsat:Field">
|
||||||
|
<dcsat:value xsi:type="v8:LocalStringType">
|
||||||
|
<v8:item>
|
||||||
|
<v8:lang>ru</v8:lang>
|
||||||
|
<v8:content>Заголовок</v8:content>
|
||||||
|
</v8:item>
|
||||||
|
</dcsat:value>
|
||||||
|
</dcsat:item>
|
||||||
|
</dcsat:tableCell>
|
||||||
|
</dcsat:item>
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
|
<template>
|
||||||
|
<name>Макет3</name>
|
||||||
|
<template xmlns:dcsat="http://v8.1c.ru/8.1/data-composition-system/area-template" xsi:type="dcsat:AreaTemplate">
|
||||||
|
<dcsat:item xsi:type="dcsat:TableRow">
|
||||||
|
<dcsat:tableCell>
|
||||||
|
<dcsat:item xsi:type="dcsat:Field">
|
||||||
|
<dcsat:value xsi:type="dcscor:Parameter">Счет</dcsat:value>
|
||||||
|
</dcsat:item>
|
||||||
|
<dcsat:appearance>
|
||||||
|
<dcscor:item>
|
||||||
|
<dcscor:parameter>Шрифт</dcscor:parameter>
|
||||||
|
<dcscor:value xsi:type="v8ui:Font" faceName="Arial" height="10" bold="false" italic="false" underline="false" strikeout="false" kind="Absolute" scale="100" />
|
||||||
|
</dcscor:item>
|
||||||
|
</dcsat:appearance>
|
||||||
|
</dcsat:tableCell>
|
||||||
|
<dcsat:tableCell>
|
||||||
|
<dcsat:item xsi:type="dcsat:Field">
|
||||||
|
<dcsat:value xsi:type="dcscor:Parameter">Рес1</dcsat:value>
|
||||||
|
</dcsat:item>
|
||||||
|
<dcsat:appearance>
|
||||||
|
<dcscor:item>
|
||||||
|
<dcscor:parameter>Шрифт</dcscor:parameter>
|
||||||
|
<dcscor:value xsi:type="v8ui:Font" faceName="Arial" height="10" bold="false" italic="false" underline="false" strikeout="false" kind="Absolute" scale="100" />
|
||||||
|
</dcscor:item>
|
||||||
|
</dcsat:appearance>
|
||||||
|
</dcsat:tableCell>
|
||||||
|
<dcsat:tableCell>
|
||||||
|
<dcsat:item xsi:type="dcsat:Field">
|
||||||
|
<dcsat:value xsi:type="dcscor:Parameter">Рес2</dcsat:value>
|
||||||
|
</dcsat:item>
|
||||||
|
<dcsat:appearance>
|
||||||
|
<dcscor:item>
|
||||||
|
<dcscor:parameter>Шрифт</dcscor:parameter>
|
||||||
|
<dcscor:value xsi:type="v8ui:Font" faceName="Arial" height="10" bold="false" italic="false" underline="false" strikeout="false" kind="Absolute" scale="100" />
|
||||||
|
</dcscor:item>
|
||||||
|
</dcsat:appearance>
|
||||||
|
</dcsat:tableCell>
|
||||||
|
</dcsat:item>
|
||||||
|
</template>
|
||||||
|
<parameter xmlns:dcsat="http://v8.1c.ru/8.1/data-composition-system/area-template" xsi:type="dcsat:ExpressionAreaTemplateParameter">
|
||||||
|
<dcsat:name>Счет</dcsat:name>
|
||||||
|
<dcsat:expression>Представление(Счет)</dcsat:expression>
|
||||||
|
</parameter>
|
||||||
|
<parameter xmlns:dcsat="http://v8.1c.ru/8.1/data-composition-system/area-template" xsi:type="dcsat:ExpressionAreaTemplateParameter">
|
||||||
|
<dcsat:name>Рес1</dcsat:name>
|
||||||
|
<dcsat:expression>Ресурс1</dcsat:expression>
|
||||||
|
</parameter>
|
||||||
|
<parameter xmlns:dcsat="http://v8.1c.ru/8.1/data-composition-system/area-template" xsi:type="dcsat:ExpressionAreaTemplateParameter">
|
||||||
|
<dcsat:name>Рес2</dcsat:name>
|
||||||
|
<dcsat:expression>Ресурс2</dcsat:expression>
|
||||||
|
</parameter>
|
||||||
|
</template>
|
||||||
|
<settingsVariant>
|
||||||
|
<dcsset:name>Основной</dcsset:name>
|
||||||
|
<dcsset:settings />
|
||||||
|
</settingsVariant>
|
||||||
|
</dataCompositionSchema>
|
||||||
+1
-1
@@ -49,7 +49,7 @@
|
|||||||
<valueType>
|
<valueType>
|
||||||
<v8:Type>xs:boolean</v8:Type>
|
<v8:Type>xs:boolean</v8:Type>
|
||||||
</valueType>
|
</valueType>
|
||||||
<value xsi:type="xs:boolean">False</value>
|
<value xsi:type="xs:boolean">false</value>
|
||||||
<useRestriction>false</useRestriction>
|
<useRestriction>false</useRestriction>
|
||||||
</parameter>
|
</parameter>
|
||||||
<settingsVariant>
|
<settingsVariant>
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
<field xsi:type="DataSetFieldField">
|
<field xsi:type="DataSetFieldField">
|
||||||
<dataPath>Число</dataPath>
|
<dataPath>Число</dataPath>
|
||||||
<field>Число</field>
|
<field>Число</field>
|
||||||
|
<presentationExpression>Формат(Число, "ЧГ=")</presentationExpression>
|
||||||
<valueType>
|
<valueType>
|
||||||
<v8:Type>xs:decimal</v8:Type>
|
<v8:Type>xs:decimal</v8:Type>
|
||||||
<v8:NumberQualifiers>
|
<v8:NumberQualifiers>
|
||||||
@@ -17,7 +18,6 @@
|
|||||||
<v8:AllowedSign>Any</v8:AllowedSign>
|
<v8:AllowedSign>Any</v8:AllowedSign>
|
||||||
</v8:NumberQualifiers>
|
</v8:NumberQualifiers>
|
||||||
</valueType>
|
</valueType>
|
||||||
<presentationExpression>Формат(Число, "ЧГ=")</presentationExpression>
|
|
||||||
</field>
|
</field>
|
||||||
<field xsi:type="DataSetFieldField">
|
<field xsi:type="DataSetFieldField">
|
||||||
<dataPath>Флаг</dataPath>
|
<dataPath>Флаг</dataPath>
|
||||||
@@ -32,6 +32,9 @@
|
|||||||
<calculatedField>
|
<calculatedField>
|
||||||
<dataPath>Удвоенное</dataPath>
|
<dataPath>Удвоенное</dataPath>
|
||||||
<expression>Число * 2</expression>
|
<expression>Число * 2</expression>
|
||||||
|
<useRestriction>
|
||||||
|
<group>true</group>
|
||||||
|
</useRestriction>
|
||||||
<valueType>
|
<valueType>
|
||||||
<v8:Type>xs:decimal</v8:Type>
|
<v8:Type>xs:decimal</v8:Type>
|
||||||
<v8:NumberQualifiers>
|
<v8:NumberQualifiers>
|
||||||
@@ -40,16 +43,13 @@
|
|||||||
<v8:AllowedSign>Any</v8:AllowedSign>
|
<v8:AllowedSign>Any</v8:AllowedSign>
|
||||||
</v8:NumberQualifiers>
|
</v8:NumberQualifiers>
|
||||||
</valueType>
|
</valueType>
|
||||||
<useRestriction>
|
|
||||||
<group>true</group>
|
|
||||||
</useRestriction>
|
|
||||||
</calculatedField>
|
</calculatedField>
|
||||||
<parameter>
|
<parameter>
|
||||||
<name>П</name>
|
<name>П</name>
|
||||||
<valueType>
|
<valueType>
|
||||||
<v8:Type>xs:boolean</v8:Type>
|
<v8:Type>xs:boolean</v8:Type>
|
||||||
</valueType>
|
</valueType>
|
||||||
<value xsi:type="xs:boolean">False</value>
|
<value xsi:type="xs:boolean">false</value>
|
||||||
<useRestriction>false</useRestriction>
|
<useRestriction>false</useRestriction>
|
||||||
</parameter>
|
</parameter>
|
||||||
<settingsVariant>
|
<settingsVariant>
|
||||||
@@ -73,6 +73,13 @@
|
|||||||
<dcsset:right xsi:type="xs:boolean">true</dcsset:right>
|
<dcsset:right xsi:type="xs:boolean">true</dcsset:right>
|
||||||
</dcsset:item>
|
</dcsset:item>
|
||||||
</dcsset:filter>
|
</dcsset:filter>
|
||||||
|
<dcsset:dataParameters>
|
||||||
|
<dcscor:item xsi:type="dcsset:SettingsParameterValue">
|
||||||
|
<dcscor:parameter>П</dcscor:parameter>
|
||||||
|
<dcscor:value xsi:type="xs:boolean">false</dcscor:value>
|
||||||
|
<dcsset:userSettingID>0eb70b37-3a01-40a0-81c1-98028ef06a05</dcsset:userSettingID>
|
||||||
|
</dcscor:item>
|
||||||
|
</dcsset:dataParameters>
|
||||||
<dcsset:outputParameters>
|
<dcsset:outputParameters>
|
||||||
<dcscor:item xsi:type="dcsset:SettingsParameterValue">
|
<dcscor:item xsi:type="dcsset:SettingsParameterValue">
|
||||||
<dcscor:parameter>Заголовок</dcscor:parameter>
|
<dcscor:parameter>Заголовок</dcscor:parameter>
|
||||||
@@ -84,13 +91,6 @@
|
|||||||
</dcscor:value>
|
</dcscor:value>
|
||||||
</dcscor:item>
|
</dcscor:item>
|
||||||
</dcsset:outputParameters>
|
</dcsset:outputParameters>
|
||||||
<dcsset:dataParameters>
|
|
||||||
<dcscor:item xsi:type="dcsset:SettingsParameterValue">
|
|
||||||
<dcscor:parameter>П</dcscor:parameter>
|
|
||||||
<dcscor:value xsi:type="xs:boolean">false</dcscor:value>
|
|
||||||
<dcsset:userSettingID>0930043f-cf2a-42c1-ae8c-4accf2fd2604</dcsset:userSettingID>
|
|
||||||
</dcscor:item>
|
|
||||||
</dcsset:dataParameters>
|
|
||||||
<dcsset:item xsi:type="dcsset:StructureItemGroup">
|
<dcsset:item xsi:type="dcsset:StructureItemGroup">
|
||||||
<dcsset:order>
|
<dcsset:order>
|
||||||
<dcsset:item xsi:type="dcsset:OrderItemAuto"/>
|
<dcsset:item xsi:type="dcsset:OrderItemAuto"/>
|
||||||
|
|||||||
@@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"name": "Корень dataCompositionSchema со строчной — предупреждение: платформа загружает, конфигуратор пишет с заглавной",
|
||||||
|
"setup": "fixture:root-lowercase",
|
||||||
|
"params": { "templatePath": "Template.xml" },
|
||||||
|
"expect": {
|
||||||
|
"stdoutContains": "[WARN] Root element is 'dataCompositionSchema' — the platform loads it, but the Designer writes 'DataCompositionSchema'",
|
||||||
|
"stdoutNotContains": "[ERROR]"
|
||||||
|
},
|
||||||
|
"noSnapshot": "результат — только вывод"
|
||||||
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "XSD точной версии: подсказки по порядку и сжатый текст без пространств имён",
|
"name": "XSD точной версии: подсказки по порядку; False — один раз, собственной проверкой",
|
||||||
"setup": "fixture:xsd-bad-220",
|
"setup": "fixture:xsd-bad-220",
|
||||||
"requires": ".v8-xsd/2.20",
|
"requires": ".v8-xsd/2.20",
|
||||||
"preRun": [
|
"preRun": [
|
||||||
@@ -20,10 +20,14 @@
|
|||||||
"stdoutContains": [
|
"stdoutContains": [
|
||||||
"[ERROR] XSD 2.20, line 20: field/presentationExpression: must come before <valueType>",
|
"[ERROR] XSD 2.20, line 20: field/presentationExpression: must come before <valueType>",
|
||||||
"[ERROR] XSD 2.20, line 43: calculatedField/useRestriction: must come before <valueType>",
|
"[ERROR] XSD 2.20, line 43: calculatedField/useRestriction: must come before <valueType>",
|
||||||
"[ERROR] XSD 2.20, line 52: parameter/value:",
|
"[ERROR] XSD 2.20, line 87: settings/dataParameters: must come before <outputParameters>",
|
||||||
"[ERROR] XSD 2.20, line 87: settings/dataParameters: must come before <outputParameters>"
|
"<value xsi:type=\"xs:boolean\">False</value> — boolean must be true or false (lowercase)",
|
||||||
|
"=== Result: 4 errors"
|
||||||
],
|
],
|
||||||
"stdoutNotContains": "http://v8.1c.ru"
|
"stdoutNotContains": [
|
||||||
|
"http://v8.1c.ru",
|
||||||
|
"parameter/value"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"noSnapshot": "результат — только вывод; схемы 1С не должны попасть в эталон"
|
"noSnapshot": "результат — только вывод; схемы 1С не должны попасть в эталон"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "Шаблон вне выгрузки — версия формата неизвестна, проверка не выполняется",
|
"name": "Шаблон вне выгрузки — версия формата неизвестна, пометка в итоговой строке",
|
||||||
"setup": "fixture:xsd-no-anchor",
|
"setup": "fixture:xsd-no-anchor",
|
||||||
"preRun": [
|
"preRun": [
|
||||||
{
|
{
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
"-Detailed"
|
"-Detailed"
|
||||||
],
|
],
|
||||||
"expect": {
|
"expect": {
|
||||||
"stdoutContains": "[OK] XSD: format version unknown (template outside a dump) — not checked",
|
"stdoutContains": "checks; XSD not checked: template outside a dump) ===",
|
||||||
"stdoutNotContains": [
|
"stdoutNotContains": [
|
||||||
"[ERROR]",
|
"[ERROR]",
|
||||||
"[WARN]"
|
"[WARN]"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "Каталога схем нет, -Detailed — строка о пропуске",
|
"name": "Каталога схем нет, -Detailed — пометка в итоговой строке",
|
||||||
"setup": "fixture:xsd-bad-220",
|
"setup": "fixture:xsd-good-220",
|
||||||
"preRun": [
|
"preRun": [
|
||||||
{
|
{
|
||||||
"writeFile": {
|
"writeFile": {
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
"-Detailed"
|
"-Detailed"
|
||||||
],
|
],
|
||||||
"expect": {
|
"expect": {
|
||||||
"stdoutContains": "[OK] XSD: no schemas in project — not checked",
|
"stdoutContains": "checks; XSD not checked: no schemas (/v8-xsd-fetch)) ===",
|
||||||
"stdoutNotContains": [
|
"stdoutNotContains": [
|
||||||
"[ERROR]",
|
"[ERROR]",
|
||||||
"[WARN]"
|
"[WARN]"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "Каталога схем нет — проверки нет, строк XSD в выводе нет",
|
"name": "Каталога схем нет — проверки нет, итоговая строка говорит об этом",
|
||||||
"setup": "fixture:xsd-bad-220",
|
"setup": "fixture:xsd-good-220",
|
||||||
"preRun": [
|
"preRun": [
|
||||||
{
|
{
|
||||||
"writeFile": {
|
"writeFile": {
|
||||||
@@ -15,8 +15,14 @@
|
|||||||
"templatePath": "Reports/Отчет/Templates/Схема/Ext/Template.xml"
|
"templatePath": "Reports/Отчет/Templates/Схема/Ext/Template.xml"
|
||||||
},
|
},
|
||||||
"expect": {
|
"expect": {
|
||||||
"stdoutContains": "=== Validation OK",
|
"stdoutContains": [
|
||||||
"stdoutNotContains": "XSD"
|
"=== Validation OK: Template.xml (",
|
||||||
|
"checks; XSD not checked: no schemas (/v8-xsd-fetch)) ==="
|
||||||
|
],
|
||||||
|
"stdoutNotContains": [
|
||||||
|
"[ERROR]",
|
||||||
|
"[WARN]"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"noSnapshot": "результат — только вывод"
|
"noSnapshot": "результат — только вывод"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "В каталоге схем только старшие версии — предупреждение, проверка не выполняется",
|
"name": "В каталоге схем только старшие версии — предупреждение, проверка не выполняется",
|
||||||
"setup": "fixture:xsd-bad-220",
|
"setup": "fixture:xsd-good-220",
|
||||||
"preRun": [
|
"preRun": [
|
||||||
{
|
{
|
||||||
"writeFile": {
|
"writeFile": {
|
||||||
|
|||||||
Reference in New Issue
Block a user