rem: if (!ID) { return null; }     var tocTree = document.getElementById("help-toc-panel"); var tocDS = tocTree.database; if (tocDS == null) { return null; } var tocDatasources = tocTree.getAttribute("datasources"); var ds = tocDatasources.split(/\s+/); for (var i=0; i < ds.length; ++i) { if (ds[i] == "rdf:null" || ds[i] == "") { continue; } try { var rdfID = ds[i] + "#" + ID; var resource = RDF.GetResource(rdfID); if (resource) { var link = tocDS.GetTarget(resource, NC_LINK, true); if (link) { link = link.QueryInterface(Components.interfaces .nsIRDFLiteral); if (link) { return link.Value; } else { return null; } } } } catch (e) { log(rdfID + " " + e); } 
add: if (!ID) return null;  var tocDS = document.getElementById("help-toc-panel").database; if (!tocDS) return null;    var tocDSArray = gTocDSList.split(/\s+/);  for (var i = 0; i < tocDSArray.length; i++) { var resource = RDF.GetResource(tocDSArray[i] + "#" + ID); var link = tocDS.GetTarget(resource, NC_LINK, true); if (!link) continue; return link.QueryInterface(Components.interfaces.nsIRDFLiteral).Value; 
context: function getLink(ID) {    if (!ID) {        return null;    }    // Note resources are stored in fileURL#ID format.    // We have one possible source for an ID for each datasource in the    // composite datasource.    // The first ID which matches is returned.    var tocTree = document.getElementById("help-toc-panel");    var tocDS = tocTree.database;    if (tocDS == null) {        return null;    }    var tocDatasources = tocTree.getAttribute("datasources");    var ds = tocDatasources.split(/\s+/);    for (var i=0; i < ds.length; ++i) {        if (ds[i] == "rdf:null" || ds[i] == "") {            continue;        }        try {            var rdfID = ds[i] + "#" + ID;            var resource = RDF.GetResource(rdfID);            if (resource) {                var link = tocDS.GetTarget(resource, NC_LINK, true);                if (link) {                    link = link.QueryInterface(Components.interfaces                        .nsIRDFLiteral);                    if (link) {                        return link.Value;                    } else {                        return null;                    }                }            }        } catch (e) {            log(rdfID + " " + e);        }    }    return null;}
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/80c75a4ba0fb2cddfbfb96ef3ca370e6a36d8fac/help.js/clean/toolkit/components/help/content/help.js