]> Cypherpunks repositories - gostls13.git/commit
encoding/xml: fix default namespace of tags
authorRoger Peppe <rogpeppe@gmail.com>
Fri, 6 Mar 2015 11:32:42 +0000 (11:32 +0000)
committerroger peppe <rogpeppe@gmail.com>
Mon, 9 Mar 2015 09:10:30 +0000 (09:10 +0000)
commit9f9d66d3b66d1d23fd5578f30b2fa084e4f83902
tree18813d43328fe659d8c6fa67e3fdb939a9b54990
parent44e903158faca58bf495dc2f263d6973f62b9d17
encoding/xml: fix default namespace of tags

The struct XMLName sets the default namespace, but
that's not good enough for nested tags, because an
earlier tag can set the implicit parents of a subsequent
tag. This change makes sure that we always explicitly set the
namespace on a tag when possible.

See https://go-review.googlesource.com/#/c/5910/4/src/encoding/xml/marshal_test.go@628
for discussion.

Change-Id: If1afc536471c0be83e5dd80381b598476ea3f44d
Reviewed-on: https://go-review.googlesource.com/6927
Reviewed-by: Nigel Tao <nigeltao@golang.org>
Reviewed-by: Dave Cheney <dave@cheney.net>
src/encoding/xml/marshal_test.go
src/encoding/xml/typeinfo.go