Closed Bug 41286 Opened 26 years ago Closed 22 years ago

XUL DOM1 Unimplemented Methods: createEntityReference, createAttribute, possibly setAttributeNode

Categories

(Core :: DOM: Core & HTML, defect, P3)

defect

Tracking

()

RESOLVED DUPLICATE of bug 9850
Future

People

(Reporter: tim, Assigned: hyatt)

References

Details

(Keywords: dom1, helpwanted)

Attachments

(1 file)

According to the DOM Level 1 Core specification, entity references cannot be dynamically added to a document attribute with just the "setAttribute" method: "Adds a new attribute. If an attribute with that name is already present in the element, its value is changed to be that of the value parameter. This value is a simple string, it is not parsed as it is being set. So any markup (such as syntax to be recognized as an entity reference) is treated as literal text, and needs to be appropriately escaped by the implementation when it is written out. In order to assign an attribute value that contains entity references, the user must create an Attr node plus any Text and EntityReference nodes, build the appropriate subtree, and use setAttributeNode to assign it as the value of an attribute." Given this, one should be able to add entity references to an attribute with the following JavaScript code: var atr = document.createAttribute("attribute"); var entref = document.createEntityReference("entityreference"); var el = document.createElement("element"); atr.appendChild(entref); el.setAttributeNode(atr); However, under XUL, createAttribute and createEntityReference throw a NS_ERROR_NOT_IMPLEMENTED exception. I'm not sure if setAttributeNode is implemented either since I can't get an attribute node to pass to it. Under HTML, createAttribute works, and createEntityReference correctly returns NS_ERROR_DOM_NOT_SUPPORTED_ERR. I have not tested this with any other XML documents.
Is this a blocker for bug 2800, Tim? If so, mark it. If not, ignore me. :-)
Bug 9850 is related to this; createEntityReference is not implemented for general XML documents either.
Summary: DOM1 Unimplemented Methods: createEntityReference, createAttribute, possibly setAttributeNode → XUL DOM1 Unimplemented Methods: createEntityReference, createAttribute, possibly setAttributeNode
confirming so waterson can take a look at this
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: other → All
Hardware: PC → All
-> mfuture
Status: NEW → ASSIGNED
Keywords: helpwanted
Target Milestone: --- → Future
Chris, taking this off your plate as this is DOM related. We'll work on this post Netscape 6.
Assignee: waterson → nisheeth
Status: ASSIGNED → NEW
Mass update of qa contact
QA Contact: gerardok → janc
Keywords: dom1
Component: DOM Level 1 → DOM Core
QA contact Update
QA Contact: janc → desale
Mathods are not implimented for XUL. So its like not having FEATURE COMPLETE. Nominating for nsbeta1. Adding keywords mozilla0.9.1, nsbeta1.
Since XUL DOM, reassigning to hyatt.
Assignee: nisheeth → hyatt
Target Milestone: Future → ---
Status: NEW → ASSIGNED
Target Milestone: --- → Future
Updating QA contact to Shivakiran Tummala.
QA Contact: desale → stummala
would a fix for this bug include implementing createAttributeNS ?
Blocks: 104166
Depends on: 124412
wfm Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.5a) Gecko/20030611 -- DOM Inspector confirms "no error" textnodes added per testcase. I believe bug 124412 fixed this.
Clarification: with the fix for bug 124412, this becomes a dupe of bug 9850, per comment 2 of this bug.
*** This bug has been marked as a duplicate of 9850 ***
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → DUPLICATE
Component: DOM: Core → DOM: Core & HTML
QA Contact: stummala → general
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: