Skip to content

Add MetronInfo namespace declarations to written XML root#236

Merged
bpepple merged 1 commit into
masterfrom
mi-fix
Jul 3, 2026
Merged

Add MetronInfo namespace declarations to written XML root#236
bpepple merged 1 commit into
masterfrom
mi-fix

Conversation

@bpepple

@bpepple bpepple commented Jul 3, 2026

Copy link
Copy Markdown
Member

Summary

  • Emit xmlns:metroninfo, xmlns:xsd, xmlns:xsi, and xsi:schemaLocation on the <MetronInfo> root element when writing/serializing MetronInfo XML, matching the format expected by the upstream schema.
  • Validate the serialized XML bytes rather than the live ElementTree object, since xmlschema misreads xmlns:* attributes set directly on an in-memory Element as regular (disallowed) attributes instead of namespace declarations — validating the actual bytes that get written avoids this and removes an order-dependency between attaching the attributes and validating.

Emit xmlns:metroninfo, xmlns:xsd, xmlns:xsi, and xsi:schemaLocation on the <MetronInfo> root element to match the upstream schema's expected format. Schema validation now checks the serialized XML bytes rather than the live ElementTree object, since xmlschema misreads xmlns:* attributes set directly on an in-memory Element as regular attributes instead of namespace declarations.
@bpepple bpepple self-assigned this Jul 3, 2026
@bpepple bpepple added the enhancement New feature or request label Jul 3, 2026
@bpepple bpepple merged commit e3d961c into master Jul 3, 2026
13 checks passed
@bpepple bpepple deleted the mi-fix branch July 3, 2026 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant