Skip to content

Keep the GPX schema when appending extension schema locations - #310

Open
xiehuanyi wants to merge 1 commit into
tkrajina:devfrom
xiehuanyi:fix/append-extension-schema-locations
Open

xiehuanyi wants to merge 1 commit into
tkrajina:devfrom
xiehuanyi:fix/append-extension-schema-locations

Conversation

@xiehuanyi

Copy link
Copy Markdown

Appending extension schemas to a new GPX object before its first to_xml() call suppresses the default GPX schema pair. Ensure the current GPX namespace has a schema pair before serialization, while retaining extension pairs and any explicitly supplied schema URL for that namespace. Repeated serialization does not add duplicates.

Fixes #210.

Validation: the new regression fails on the original implementation for GPX 1.0 and 1.1 and passes after the fix. All 154 unittest tests pass; make run-gpxinfo passes. Verified the issue reproduction survives an XML parse/serialize round trip, and a custom GPX schema URL stays unchanged. Strict mypy reports the same 19 errors as the unchanged baseline, with no new diagnostics (mypy 2.4.0).

AI assistance: prepared and verified with OpenAI Codex.

Copilot AI balanced review requested due to automatic review settings October 7, 2026 10:40

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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.

List of xsi:schemaLocation cannot be appended

2 participants