Repository navigation
Commit e9cceb2
committed
gh-158208: Don't write a duplicate xmlns attribute in xml.dom.minidom
Since gh-44376, _fixup_namespaces() adds xmlns="" to an element in no
namespace under a default namespace. When the element declares the
default namespace itself, as one built with createElement() and
setAttribute("xmlns", ...) does, its own xmlns attribute was written
too, so the output was not well-formed.
Do not add the undeclaration if the element already has an xmlns
attribute. The default namespace is still treated as undeclared for
its children, so they are written as before.1 parent ee1bbf0 commit e9cceb2
2 files changed
Lines changed: 24 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
702 | 702 | | |
703 | 703 | | |
704 | 704 | | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
705 | 727 | | |
706 | 728 | | |
707 | 729 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
449 | 449 | | |
450 | 450 | | |
451 | 451 | | |
452 | | - | |
| 452 | + | |
| 453 | + | |
453 | 454 | | |
454 | 455 | | |
455 | 456 | | |
| |||
0 commit comments