This an XML issue, not a Go one. The default name space for attributes
is empty, not the default name space of the enclosing element.
Even if it that wasn't the case, your example would still be wrong
because there is no default namespace (xmlns="....") there.
I'd agree that this behaviour is surprising (it has caught me
out in the past), but that's just XML.
Nothing wrong with Go here (note that go 1.4 *does* get it
wrong when encoding XML, but that is fixed in tip).
If your attribute explicitly mentioned the METS name space,
it works:
http://play.golang.org/p/ebUBE0uvJg
Likewise if you don't mention the name space in the Go
field tag:
http://play.golang.org/p/gQkjp5S_gV
cheers,
rog.
> --
> You received this message because you are subscribed to the Google Groups
> "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
golang-nuts...@googlegroups.com.
> For more options, visit
https://groups.google.com/d/optout.