Opened 12 years ago

Closed 11 years ago

Last modified 10 years ago

#3590 closed enhancement (fixed)

XmlStore: use dojo.query() more

Reported by: bill Owned by: Jared Jurkiewicz
Priority: high Milestone: 1.3
Component: Query Version: 0.9
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by Jared Jurkiewicz)

This is nit-picking, but probably XmlStore::_getItems() should be changed to use dojo.query to get the nodes:

var nodes = dojo.query(this._rootItem || "*");

instead of

		if(this._rootItem){
			nodes = document.getElementsByTagName(this._rootItem);
		}
		else{
			nodes = document.documentElement.childNodes;
		}

And then also should use orphan:

return nodes.orphan(function(node){ ... });

rather than

		for(var i = 0; i < nodes.length; i++){
			var node = nodes[i];
			if(node.nodeType != 1 /*ELEMENT_NODE*/){
				continue;
			}
            var item = this._getItem(node);
...
			items.push(item);
		}
		for(var i in items){
			var element = items[i].element;
			element.parentNode.removeChild(element); // make it root
		}
		return items;

Change History (11)

comment:1 Changed 12 years ago by skinner

Owner: changed from skinner to Jared Jurkiewicz

comment:2 Changed 12 years ago by Jared Jurkiewicz

I'm not sure this can be done. As far as I understood it, dojo.query works on HTML, not on XML dom. If you've heard otherwise, please let me know. I've been trying to get a clear answer on that.

comment:3 Changed 12 years ago by Jared Jurkiewicz

According to Alex, it can't be done currently (dojo.query() doesn't support XML dom). But, he did ask for a enchancement request be opened for that, so it was. When Tracker: #3866 goes in, it should work.

comment:4 Changed 12 years ago by Jared Jurkiewicz

Er, that is, this should be addressable.

comment:5 Changed 12 years ago by Jared Jurkiewicz

Milestone: 1.01.1

comment:6 Changed 12 years ago by Jared Jurkiewicz

Milestone: 1.11.2

#3866 isn't in yet, so moving this out.

comment:7 Changed 11 years ago by Jared Jurkiewicz

Description: modified (diff)
Milestone: 1.2tbd

comment:8 Changed 11 years ago by Jared Jurkiewicz

Milestone: tbdfuture

This is a nice to have, but not imperative, as current implementation works. Targetting this as sometime in the future.

comment:9 Changed 11 years ago by Jared Jurkiewicz

Resolution: fixed
Status: newclosed

As of some work I'm doing for identity support in Xmlstore, I've used dojo.query as much as currently possible (basedon what worked/didn't work, across browser). Therefore, closing this as fixed for now. Fixes will go in under:

http://bugs.dojotoolkit.org/ticket/7737

comment:10 Changed 11 years ago by Adam Peller

Milestone: future1.3

batch move of tickets marked 'future' in the 1.3 timeframe

comment:11 Changed 10 years ago by bill

Component: DataQuery
Note: See TracTickets for help on using tickets.