kadas-albireo / kadas-albireo2

KADAS Albireo
GNU General Public License v2.0
67 stars 14 forks source link

KML generated by KADAS fails validation against the specified xmlns #11

Closed TxKroar closed 4 years ago

TxKroar commented 4 years ago

Hello everyone, while attempting to import/parse a KML File generated by KADAS in another application we noticed that there's a minor issue with the generated KML: Attempting to Validate KML generated by KADAS CI Build for Commit 9ba17c02b4cfb4f8fc171369ae710ba63c4bc256 fails: image (The KML File in the Screenshot is a pretty printed version of the KML File in the following Archive: test-kml.zip)

The reason for the validation failure is that the XSD Schema for KML Files uses \<sequence> Tags for the Child Elements within the \<LineStyle> Tag and thus the order of the Child elements matters: image image XSD Schema used by KADAS in KML Files: http://www.opengis.net/kml/2.2 Documentation of the \<sequence> Tag: https://www.w3schools.com/xml/el_sequence.asp

The XSD Schema for KML indicates that flipping the order of the \<width> and \<color> child elements in the \<LineStyle> and \<PolyStyle> Tags solves this problem: image

The Issue is probably caused by the following code: https://github.com/kadas-albireo/kadas-albireo2/blob/9ba17c02b4cfb4f8fc171369ae710ba63c4bc256/kadas/app/kml/kadaskmlexport.cpp#L452

manisandro commented 4 years ago

Fixed, thanks!