Skip to content

fix: decode XSD attributes and preserve generated enum literals - #138

Closed
nth-bailey wants to merge 3 commits into
perf/xml-runtime-investigationfrom
fix/xsd-attribute-values
Closed

nth-bailey wants to merge 3 commits into
perf/xml-runtime-investigationfrom
fix/xsd-attribute-values

Conversation

@nth-bailey

@nth-bailey nth-bailey commented Oct 3, 2026 •

Copy link
Copy Markdown
Collaborator

XSD attributes were copied into the IR as raw XML text, so an enum declared as R&D rejected the instance value R&D; namespace/QName validation and UPA could also disagree. Normalize attributes consistently, preserving character-reference whitespace and reporting malformed references instead of dropping values.

Decoded quotes and controls also exposed invalid generated enum literals. Escape constants, metadata, conversion tables and parse matches using the target language’s syntax. Regeneration can change enum variant identifiers and remove duplicates that previously differed only by their XML escaping.

Validation: 326 Rust tests; strict workspace Clippy and formatting; 112 Python tests with 100% statement/branch coverage; generated enum consumers compiled and executed in all seven languages, including Rust Serde round trips. C# targets .NET 8 and was executed with .NET 10 roll-forward. Companion W3C comparisons and seven-target smoke results are recorded in the follow-up report.

Stacked on #137; keep this draft until that runtime investigation is reviewed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant