Bug 3811 - XML serializer does not support namespaces
Summary: XML serializer does not support namespaces
Status: RESOLVED DUPLICATE of bug 5262
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 312.x
Hardware: Mac OS X 10.3
: P2 Major
Assignee: Maciej Stachowiak
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-02 05:07 PDT by Henri Sivonen
Modified: 2019-02-06 09:04 PST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Henri Sivonen 2005-07-02 05:07:22 PDT
Steps to reproduce:
1) Load an XML document that uses namespaces. In particular, there should be an
xml:lang attribute.
2) Add some namespaced stuff to the DOM tree using the NS-aware DOM level 2 API
calls.
3) Use the setAttributeNS and setAttribute methods to attempt to modify the
xml:lang attribute.
4) POST the modified doc to the server.

Actual results:
The serialization does not have namespaces at all and the local names are used
as element and attribute names. The element that had an xml:lang attribute may
now have two (!) attributes named lang making the serialization ill-formed!

Expected results:
Expected a namespace-savvy serializer to be used. That is, expected the
serializer to preserve (ns-URI,localName) pairs by synthetizing xmlns attibutes
and prefixes if necessary. Expected residual prefixes and xmlns attributes to be
used as hints of preferred prefixes when possible.

Expected DOM Level 1 tampering with the xml:foo attributes to get the namespace
right. (IE does not do namespaces or DOM Level 1 but does have sane behavior
with DOM Level 1 and xml:foo attributes.)

Additional info:
I had to fall back to RSS-style non-XML-ish language metadata, which is uncool.
Comment 1 Alexey Proskuryakov 2005-12-23 05:38:16 PST

*** This bug has been marked as a duplicate of 5262 ***
Comment 2 Lucas Forschler 2019-02-06 09:04:09 PST
Mass moving XML DOM bugs to the "DOM" Component.