rem: RDFC.RemoveElement(IDRes, false); 
add: RDFC.RemoveElement(IDRes, true); dirty = true; 
context: function doDelete(promptFlag){	var treeNode = document.getElementById("bookmarksTree");	if (!treeNode)    return(false);	var select_list = treeNode.selectedItems;	if (!select_list)	return(false);	if (select_list.length < 1)    return(false);	dump("# of Nodes selected: " + select_list.length + "\n\n");	if (promptFlag == true)	{		var ok = confirm("Delete the selected bookmark(s)?");		if (!ok)	return(false);	}	var RDF = Components.classes["component://netscape/rdf/rdf-service"].getService();	RDF = RDF.QueryInterface(Components.interfaces.nsIRDFService);	if (!RDF)	return(false);	var RDFC = Components.classes["component://netscape/rdf/container"].getService();	RDFC = RDFC.QueryInterface(Components.interfaces.nsIRDFContainer);	if (!RDFC)	return(false);	var Bookmarks = RDF.GetDataSource("rdf:bookmarks");	if (!Bookmarks)	return(false);	// note: backwards delete so that we handle odd deletion cases such as	//       deleting a child of a folder as well as the folder itself	for (var nodeIndex=select_list.length-1; nodeIndex>=0; nodeIndex--)	{		var node = select_list[nodeIndex];		if (!node)    continue;		var ID = node.getAttribute("id");		if (!ID)    continue;		var parentID = node.parentNode.parentNode.getAttribute("ref");		if (!parentID)	parentID = node.parentNode.parentNode.getAttribute("id");		if (!parentID)	continue;		dump("Node " + nodeIndex + ": " + ID + "\n");		dump("Parent Node " + nodeIndex + ": " + parentID + "\n");		var IDRes = RDF.GetResource(ID);		if (!IDRes)	continue;		var parentIDRes = RDF.GetResource(parentID);		if (!parentIDRes)	continue;		RDFC.Init(Bookmarks, parentIDRes);		RDFC.RemoveElement(IDRes, false);		// XXX should probably be true	}	var remote = Bookmarks.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource);	if (remote)	{		remote.Flush();		dump("Wrote out bookmark changes.\n");	}	return(true);}
meta: 5459	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5459/4e58337f7911edec006a6b6c45768a1cc260a308/bookmarks.js/clean/suite/common/bookmarks/bookmarks.js