Bug 3811
| Summary: | XML serializer does not support namespaces | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Henri Sivonen <hsivonen> |
| Component: | DOM | Assignee: | Maciej Stachowiak <mjs> |
| Status: | RESOLVED DUPLICATE | ||
| Severity: | Major | CC: | cdumez |
| Priority: | P2 | ||
| Version: | 312.x | ||
| Hardware: | Mac | ||
| OS: | OS X 10.3 | ||
Henri Sivonen
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.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Alexey Proskuryakov
*** This bug has been marked as a duplicate of 5262 ***
Lucas Forschler
Mass moving XML DOM bugs to the "DOM" Component.