mirror of
https://github.com/Nikolay-Shirokov/cc-1c-skills.git
synced 2026-09-17 23:35:22 +03:00
feat(meta-compile): support composite types and fix d5p1 namespace
- Add composite type support via + separator in Emit-TypeContent (PS/PY) - Fix reference types: cfg: → d5p1: with local xmlns declaration in Emit-TypeContent, valueTypes loop, EventSubscription source - Fix lxml stripping xmlns:d5p1 in meta-edit.py save_xml (post-process) - Fix IndentationError in meta-compile.py and meta-validate.py - Document composite type syntax in SKILL.md Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
4490aeb533
commit
fde6d346d7
@@ -1971,6 +1971,13 @@ def save_xml(tree, path):
|
||||
xml_bytes = etree.tostring(tree, xml_declaration=True, encoding="UTF-8")
|
||||
# Fix encoding quotes: encoding='UTF-8' -> encoding="UTF-8"
|
||||
xml_bytes = xml_bytes.replace(b"encoding='UTF-8'", b'encoding="UTF-8"')
|
||||
# Fix d5p1 namespace declarations stripped by lxml (it treats them as unused
|
||||
# because d5p1: appears only in text content, not in element/attribute names)
|
||||
xml_bytes = re.sub(
|
||||
b'(<v8:Type)(?! xmlns:d5p1)(>d5p1:)',
|
||||
b'\\1 xmlns:d5p1="http://v8.1c.ru/8.1/data/enterprise/current-config"\\2',
|
||||
xml_bytes
|
||||
)
|
||||
with open(path, "wb") as f:
|
||||
f.write(b"\xef\xbb\xbf")
|
||||
f.write(xml_bytes)
|
||||
|
||||
Reference in New Issue
Block a user