summaryrefslogtreecommitdiff
path: root/libgo/go/xml/xml.go
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/go/xml/xml.go')
-rw-r--r--libgo/go/xml/xml.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/libgo/go/xml/xml.go b/libgo/go/xml/xml.go
index e7ba44e4a26..85c24bc4503 100644
--- a/libgo/go/xml/xml.go
+++ b/libgo/go/xml/xml.go
@@ -390,7 +390,11 @@ func (p *Parser) popElement(t *EndElement) bool {
// translations that were associated with the element we just closed.
for p.stk != nil && p.stk.kind != stkStart {
s := p.pop()
- p.ns[s.name.Local] = s.name.Space, s.ok
+ if s.ok {
+ p.ns[s.name.Local] = s.name.Space
+ } else {
+ delete(p.ns, s.name.Local)
+ }
}
return true