This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Specifically, step 11.2 in the Element serialization is too naïve. There are cases where default namespace decls can cause the prefix of child to be dropped. There are cases where the prefix definition is necessary to keep.
Cases of same-namespace parent/child relationships: Parent (default ns) --> Child (no prefix) > No prefix Parent (default ns) --> Child (prefix + attr mapping prefix->different ns) > Child prefix dropped Parent (default ns) --> Child (prefix + attr mapping prefix->same ns) > Child prefix kept Parent (prefixed ns) --> Child (no prefix) > Prefix added to child Parent (prefixed ns) --> Child (prefix + attr mapping prefix->different ns) > Prefix changed to parent's Parent (prefixed ns) --> Child (prefix + attr mapping prefix->same ns) > No change (child prefix used)
Fixed in most recent update
Note, this was changelist: https://dvcs.w3.org/hg/innerhtml/rev/f9b5a818ef99