[Webkit-unassigned] [Bug 19122] New: XMLHttpRequest should use a more reasonable method to serialize documents

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun May 18 22:19:06 PDT 2008


http://bugs.webkit.org/show_bug.cgi?id=19122

           Summary: XMLHttpRequest should use a more reasonable method to
                    serialize documents
           Product: WebKit
           Version: 526+ (Nightly build)
          Platform: All
               URL: http://lists.w3.org/Archives/Public/public-
                    webapi/2008May/0294.html
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: XML
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: ap at webkit.org


>From the bug URL:

---------------------------
   var doc = document.implementation.createDocument("", "", null);
   var el = doc.createElementNS("ns1", "x:y");
   el.setAttributeNS("ns2", "x:z", "val");
   doc.appendChild(el);
   var xhr = new XMLHttpRequest();
   xhr.open("POST", "echo.cgi", false);
   xhr.send(doc);
   alert(xhr.responseText);

Here echo.cgi is the following CGI:

   #!/usr/bin/perl 

   print "Content-Type: text/plain\n\n";
   while (<>) {
     print;
   }

Here are the results I see:

   Firefox 3rc1:

     <x:y xmlns:x="ns1" a0:z="val" xmlns:a0="ns2"/>

   Opera 9.25:

     <?xml version="1.0"?><x:y x:z="val" xmlns:x="ns1"/>

   Safari 3.1:

     <x:y x:z="val" />

Ignoring the Safari serialization, which is not in fact ns-wellformed no matter 
how you slice it, the other two are ns-wellformed XML.  Neither one roundtrips 
to quite the original document.  Which one is "correct" per the current spec? 
Or is it neither one?  Should an exception have been thrown in this case?  Why 
or why not?  If there shouldn't have been an exception in this case, how is a
UA 
to determine that?
---------------------------

JSXMLHttpRequest uses Document::toString(), which is a weird method, see also:
bug 18421.


-- 
Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list