Opened 16 years ago

Closed 16 years ago

Last modified 15 years ago

#187 closed defect (duplicate)

dojo.xml.Parse().parseElement() fails when directly parsing an inline constructor node

Reported by: alex Owned by: dylan
Priority: high Milestone:
Component: General Version: 0.1
Keywords: Cc: [email protected]
Blocked By: Blocking:


The bug can be most easily be described in terms of using djConfig.searchIds. This should work:

  djConfig.searchIds = ["foo"];
<span dojoType="widget" id="foo" />

But instead, it's necessaray to do:

  djConfig.searchIds = ["foo"];
<span id="foo">
    <span dojoType="widget" />

This is true for parsing any inline constructor node directly. Similarly, dojo.widget.Parse is required to jump through some significant hierarchy munging in order to directly create a widget in place.

Something is very wrong with how the first-pass parser treats constructor nodes.

Change History (6)

comment:1 Changed 16 years ago by alex

Milestone: 0.2release0.3release

dylan advises that he won't fix for 0.2. Moving off to 0.3

comment:2 Changed 16 years ago by dylan

Status: newassigned

comment:3 Changed 16 years ago by anonymous

I think it would be perfect workaround to incorporate; if we had parsed the parent-node of the given searchid instead of the target id.

This would look like in hostenv_browser.js 's makeWidgets function:

 var parser = new dojo.xml.Parse();
 if(sids.length > 0){
     for(var x=0; x<sids.length; x++){
        var tmpNode = document.getElementById(sids[x]);
        if(!tmpNode){ continue; }
        /// temporary fix for bug #187: parse the searchids-node's parent!
        tmpNode = tmpNode.parentNode;

	var frag = parser.parseElement(tmpNode, null, true);

comment:4 Changed 16 years ago by sjmiles

Resolution: duplicate
Status: assignedclosed

See ticket #33

comment:5 Changed 16 years ago by anonymous

this way is usful only for HTML parsing but wht about the XML....

comment:6 Changed 15 years ago by (none)

Milestone: 0.3release

Milestone 0.3release deleted

Note: See TracTickets for help on using tickets.