Skip to content

Commit 291ccd6

Browse files
committed
Mixed content writer recursive
1 parent 34f7c8c commit 291ccd6

File tree

4 files changed

+11
-2
lines changed

4 files changed

+11
-2
lines changed

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
[comment]: # (Template for updates)
99

10+
## [0.6.3] - 2024-11-29
11+
12+
### Changed
13+
- Wider lxml requirement range.
14+
15+
1016
## [0.6.2] - 2024-11-28
1117

1218
### Changed

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "mysoc-validator"
3-
version = "0.6.2"
3+
version = "0.6.3"
44
description = "Pydantic validators for mySociety democracy types"
55
authors = ["mySociety <alex.parsons@mysociety.org>"]
66
readme = "README.md"

src/mysoc_validator/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from .models.popolo import Popolo
88
from .models.transcripts import Transcript
99

10-
__version__ = "0.6.2"
10+
__version__ = "0.6.3"
1111

1212
__all__ = [
1313
"Popolo",

src/mysoc_validator/models/xml_base/xml_to_json.py

+3
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,9 @@ def transfer_mixed_content(source: EtreeElement, target: EtreeElement) -> EtreeE
9696
new_child = etree.SubElement(target, child.tag)
9797
new_child.text = child.text
9898
new_child.tail = child.tail
99+
for attrib_key, attrib_value in child.attrib.items():
100+
new_child.attrib[attrib_key] = attrib_value
101+
transfer_mixed_content(child, new_child)
99102

100103
if source.tail:
101104
target.tail = source.tail

0 commit comments

Comments
 (0)