Skip to content

encoding/xml: missing nested namespace not handled #7113

Closed
@anacrolix

Description

@anacrolix
Nested XML namespaces aren't marshalled correctly. Setting an element namespace at the
default level as Go does, implicitly sets nested elements to the same namespace if they
don't override it.

<a xmlns="b"><c/></a>

The namespace of c, is b. However marshalling from Go data structures in which the
object corresponding to c above has no namespace set should give

<a xmlns="b"><c xmlns=""/></a>

The usual way to deal with this is to use namespace prefixes, but I don't think that's a
requirement.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.early-in-cycleA change that should be done early in the 3 month dev cycle.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions