Quantcast

[Bug 19431] New: Namespace of elements made via .createElement() in XML documents must be null

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Bug 19431] New: Namespace of elements made via .createElement() in XML documents must be null

Bugzilla from bugzilla@jessica.w3.org
Priority P2
Bug ID 19431
CC mike@w3.org, www-dom@w3.org
Assignee annevk@annevk.nl
Summary Namespace of elements made via .createElement() in XML documents must be null
QA Contact public-webapps-bugzilla@w3.org
Severity minor
Classification Unclassified
OS All
Reporter ayg@aryeh.name
Hardware All
Status NEW
Version unspecified
Component DOM
Product WebAppsWG

createElement() says "Return a new element with no attributes, namespace set to
the HTML namespace, local name set to localName, and node document set to the
context object."  But this test outputs "true" in all browsers:

data:text/html,<!DOCTYPE html>
<script>
document.documentElement.textContent = 
document.implementation
        .createDocument(null, "", null)
        .createElement("x")
        .namespaceURI === null;
</script>

The namespace needs to be null if the context object is not an HTML document.


You are receiving this mail because:
  • You are on the CC list for the bug.
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Bug 19431] Namespace of elements made via .createElement() in XML documents must be null

Bugzilla from bugzilla@jessica.w3.org
[hidden email] changed bug 19431
What Removed Added
Status NEW RESOLVED
Resolution --- WONTFIX

Comment # 2 on bug 19431 from [hidden email]
Conclusion of IRC discussion:

  <AryehGregor> So you're saying that implementers will all have to change
anyway, and what's specced is simpler than what all of them do now and believed
to be compatible enough?
  <annevk> right
  <zcorpan> yeah

Gecko bug filed: https://bugzilla.mozilla.org/show_bug.cgi?id=799937


You are receiving this mail because:
  • You are on the CC list for the bug.
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Bug 19431] Namespace of elements made via .createElement() in XML documents must be null

Bugzilla from bugzilla@jessica.w3.org
In reply to this post by Bugzilla from bugzilla@jessica.w3.org
[hidden email] changed bug 19431
What Removed Added
Status RESOLVED REOPENED
CC   bugs@pettay.fi
Resolution WONTFIX ---

Comment # 3 on bug 19431 from [hidden email]
(In reply to comment #2)
> Conclusion of IRC discussion:
> 
>   <AryehGregor> So you're saying that implementers will all have to change
> anyway, and what's specced is simpler than what all of them do now and
> believed to be compatible enough?
>   <annevk> right
>   <zcorpan> yeah
> 

The reasoning is?


You are receiving this mail because:
  • You are on the CC list for the bug.
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Bug 19431] Namespace of elements made via .createElement() in XML documents must be null

Bugzilla from bugzilla@jessica.w3.org
In reply to this post by Bugzilla from bugzilla@jessica.w3.org
[hidden email] changed bug 19431
What Removed Added
Status REOPENED RESOLVED
Resolution --- WONTFIX

Comment # 5 on bug 19431 from [hidden email]
The idea is that all Document objects will implement all Document-related
interfaces so that if you import script libraries it does not matter if you do
in an HTML/XML/XHTML/SVG/etc. document.


You are receiving this mail because:
  • You are on the CC list for the bug.
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Bug 19431] Namespace of elements made via .createElement() in XML documents must be null

Bugzilla from bugzilla@jessica.w3.org
In reply to this post by Bugzilla from bugzilla@jessica.w3.org
[hidden email] changed bug 19431
What Removed Added
Status RESOLVED REOPENED
Resolution WONTFIX ---

Comment # 6 on bug 19431 from [hidden email]
Testing in IE 10 Developer Preview, Firefox 19.0a1, Chrome 23ish dev, Opera
Next 12.50 internal.  Tests in IE actually use a simple PHP script that sets
the header, since it doesn't support data URLs for this.  I tested IE in both
IE10 browser/document mode, and IE9 browser/document mode (not actual IE9).


This is "string http://www.w3.org/1999/xhtml" in all browsers:

data:text/html,<!DOCTYPE html>
<script>
var s = document.createElement("x").namespaceURI;
document.documentElement.textContent = 
typeof s + " " + s;
</script>


This is the HTML namespace in all five as well:

data:application/xhtml+xml,<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head><script>
var s = document.createElement("x").namespaceURI;
document.documentElement.textContent =
typeof s + " " + s;
</script></head><body></body></html>

But if you change the MIME type to "application/xml", it becomes null in
IE9/Gecko/WebKit while staying the same in IE10/Opera.


This is still the HTML namespace in all five, removing the xmlns after the
fact:

data:application/xhtml+xml,<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head><script>
document.documentElement.removeAttribute("xmlns");
var s = document.createElement("x").namespaceURI;
document.documentElement.textContent =
typeof s + " " + s;
</script></head><body></body></html>


This is the HTML namespace in IE10, but null in IE9/Gecko/WebKit/Opera:

data:application/xml,<!DOCTYPE html>
<html>
<head><script xmlns="http://www.w3.org/1999/xhtml">
var s = document.createElement("x").namespaceURI;
document.documentElement.textContent =
typeof s + " " + s;
</script></head><body></body></html>

But if I change the MIME type to application/xhtml+xml, it changes to the HTML
namespace in IE9/Gecko/WebKit as well, while remaining null in Opera.


So it looks to me like in IE10 standards mode, the HTML namespace is always
returned in every case I tested.  In IE9/Gecko/WebKit, the default namespace is
determined by the MIME type that the page is served with.  In Opera it's
dependent on the namespace of the initial root element, regardless of MIME
type.  IE10 and Opera are not as likely to be web-compatible as the other
three.  I move we standardize IE9/Gecko/WebKit -- it's the dominant behavior,
and not really so much more complicated than what we have now, and what we have
now matches no one but IE10 (probably because they changed to follow the spec).


Sill to be determined before we can write a spec: what happens if the document
is created with document.implementation.createDocument?


You are receiving this mail because:
  • You are on the CC list for the bug.
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Bug 19431] Namespace of elements made via .createElement() in XML documents must be null

Bugzilla from bugzilla@jessica.w3.org
In reply to this post by Bugzilla from bugzilla@jessica.w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=19431

Anne <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|---                         |MOVED

--
You are receiving this mail because:
You are on the CC list for the bug.
Loading...