Skip to content

Default output from Marshaller should not include the namespace qualification #59

@rdamus

Description

@rdamus

i have been using this library for over a decade and recently had to upgrade to v3.x because of java17 compliance, etc.

i took KML files generated by code that i haven't touched in years and fed them to a Google Maps overlay and receive an INVALID_KML error!

this was confusing, but seems to be because the library has changed it's default behavior to now prepend kml: to all the tags in the document.

  1. this should be better documented, as it is a hidden "feature" at the moment
  2. suggest reverting this to jakarta.xml.bind.annotation.XmlNsForm.UNQUALIFIED (UNSET is apparently not advised) and let the user decide if they want namespace qualification through JAXB or not
  3. publish a separate version of the library - one with namespacing, one without?

i found this in the package-info.java:

@jakarta.xml.bind.annotation.XmlSchema(
    namespace = "http://www.opengis.net/kml/2.2",
    xmlns = {
        @jakarta.xml.bind.annotation.XmlNs( prefix = "kml", namespaceURI = "http://www.opengis.net/kml/2.2" )
        // ... other namespaces like gx, atom, xal
    },
    elementFormDefault = jakarta.xml.bind.annotation.XmlNsForm.QUALIFIED
)
package de.micromata.opengis.kml.v_2_2_0;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions