Open
Description
by seanerussell:
== What does 'go version' print? go version go1.2.1 darwin/amd64 == What steps reproduce the problem? http://play.golang.org/p/3_oUruPYhq == What happened? Encoder.EncodeToken duplicates namespace attributes. == What should have happened instead? The encoded document should have had a single namespace attribute. == Please provide any additional information below. Attribute names on an element must be unique; this is a well-formedness constraint per the XML 1.0 specification (http://www.w3.org/TR/xml/#uniqattspec). Per the specification, both validating and non-validating parsers must report well-formedness violations (http://www.w3.org/TR/xml/#sec-conformance). Encoding and decoding XML documents should be idempotent and produce equivalent documents. This issue means that not only that decoding and encoding the result produces a non-equivalent document, but that the document it generates is not-well-formed. This issue only occurs with namespaces. Normal attributes are handled correctly.