fastkml
023b3d34 - Fix three round-trip bugs found by the OGC conformance tests

Commit
59 days ago
Fix three round-trip bugs found by the OGC conformance tests - KML serialized a parsed NetworkLinkControl after the document's root feature instead of before it, producing output that failed fastkml's own bundled schema. xml_subelement_list_kwarg groups parsed children by class in registration order rather than preserving document order, so reorder KML's registration to put NetworkLinkControl first -- the XSD allows at most one of each, so a fixed order is always schema-compliant regardless of source order. - Pair.style had no StyleMap variant, so a <Pair> containing a nested <StyleMap> silently parsed as style=None. Add StyleMap to Pair's registered classes and type annotation (as a forward reference, registered after StyleMap is defined further down the same file). - Enum-typed attribute values were parsed via a straight `enum_class(text)` call, which rejected namespace-prefixed XSD QName values like SimpleField's type="xsd:string" -- even though "string" is a valid DataType value. Strip a leading prefix before the lookup in the one shared helper (_get_enum_value) used by every registered enum attribute. Updates the three tests that had pinned the old broken behavior as a regression baseline to assert the now-correct behavior instead, with real recomputed diff counts. Adds changelog entries for all three fixes. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Author
Parents
Loading