home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2003 June / PCpro_2003_06.ISO / browser / netscape / NS702base.exe / bin / chrome / help.jar / content / help / help.js < prev    next >
Encoding:
JavaScript  |  2002-06-23  |  21.8 KB  |  654 lines

  1. /* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  2.  * The contents of this file are subject to the Netscape Public
  3.  * License Version 1.1 (the "License"); you may not use this file
  4.  * except in compliance with the License. You may obtain a copy of
  5.  * the License at http://www.mozilla.org/NPL/
  6.  * 
  7.  * Software distributed under the License is distributed on an "AS
  8.  * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
  9.  * implied. See the License for the specific language governing
  10.  * rights and limitations under the License.
  11.  * 
  12.  * The Original Code is Mozilla Communicator client code, released
  13.  * March 31, 1998.
  14.  * 
  15.  * The Initial Developer of the Original Code is Netscape
  16.  * Communications Corporation. Portions created by Netscape are
  17.  * Copyright (C) 1998-1999 Netscape Communications Corporation. All
  18.  * Rights Reserved.
  19.  * Contributor(s): 
  20.  *    Original author: oeschger@netscape.com 
  21.  *    amended by: Peter Wilson (added sidebar tabs) */
  22.  
  23. //-------- global variables
  24. var helpBrowser;
  25. var helpWindow;
  26. var helpSearchPanel;
  27. var emptySearch;
  28. var emptySearchText
  29. var emptySearchLink
  30. var helpTocPanel;
  31. var helpIndexPanel;
  32. var helpGlossaryPanel;
  33.  
  34. // Namespaces
  35. const NC = "http://home.netscape.com/NC-rdf#";
  36. const SN = "rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns#";
  37. const XML = "http://www.w3.org/XML/1998/namespace#"
  38. const MAX_LEVEL = 40; // maximum depth of recursion in search datasources.
  39.  
  40. // Resources
  41. var RDF = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(Components.interfaces.nsIRDFService);
  42. var RDF_ROOT = RDF.GetResource("urn:root");
  43. var NC_PANELLIST = RDF.GetResource(NC + "panellist");
  44. var NC_PANELID = RDF.GetResource(NC + "panelid");
  45. var NC_EMPTY_SEARCH_TEXT = RDF.GetResource(NC + "emptysearchtext");
  46. var NC_EMPTY_SEARCH_LINK = RDF.GetResource(NC + "emptysearchlink");
  47. var NC_DATASOURCES = RDF.GetResource(NC + "datasources");
  48. var NC_SUBHEADINGS = RDF.GetResource(NC + "subheadings");
  49. var NC_NAME = RDF.GetResource(NC + "name");
  50. var NC_CHILD = RDF.GetResource(NC + "child");
  51. var NC_LINK = RDF.GetResource(NC + "link");
  52. var NC_TITLE = RDF.GetResource(NC + "title");
  53. var NC_BASE = RDF.GetResource(NC + "base"); 
  54. var NC_DEFAULTTOPIC = RDF.GetResource(NC + "defaulttopic"); 
  55.  
  56. var RDFCUtils = Components.classes["@mozilla.org/rdf/container-utils;1"].getService().
  57.    QueryInterface(Components.interfaces.nsIRDFContainerUtils);
  58. var RDFContainer = Components.classes["@mozilla.org/rdf/container;1"].getService(Components.interfaces.nsIRDFContainer);
  59. var CONSOLE_SERVICE = Components.classes['@mozilla.org/consoleservice;1'].getService(Components.interfaces.nsIConsoleService);
  60.             
  61. var urnID = 0;
  62. var RE;
  63.  
  64. var helpFileURI;
  65. var helpFileDS;
  66. // Set from nc:base attribute on help rdf file. It may be used for prefix reduction on all links within
  67. // the current help set.
  68. var helpBaseURI;
  69.  
  70. const defaultHelpFile = "chrome://help/locale/mozillahelp.rdf";
  71. // Set from nc:defaulttopic. It is used when the requested uri has no topic specified. 
  72. var defaultTopic = "welcome"; 
  73. var searchDatasources = "rdf:null";
  74. var searchDS = null;
  75.  
  76. const NSRESULT_RDF_SYNTAX_ERROR = 0x804e03f7; 
  77.  
  78. // This function is called by dialogs/windows that want to display context-sensitive help
  79. // These dialogs/windows should include the script chrome://help/content/contextHelp.js
  80. function displayTopic(topic) {
  81.   if (!topic)
  82.     topic = defaultTopic;
  83.   var uri = getLink(topic);
  84.   if (!uri) // Topic not found - revert to default.
  85.       uri = getLink(defaultTopic); 
  86.   loadURI(uri);
  87. }
  88.  
  89. // Initialize the Help window
  90. function init() {
  91.   //cache panel references.
  92.   helpWindow = document.getElementById("help");
  93.   helpSearchPanel = document.getElementById("help-search-panel");
  94.   helpTocPanel = document.getElementById("help-toc-tree");
  95.   helpIndexPanel = document.getElementById("help-index-tree");
  96.   helpGlossaryPanel = document.getElementById("help-glossary-tree");
  97.   helpBrowser = document.getElementById("help-content");
  98.  
  99.   var URI = normalizeURI(decodeURIComponent(window.location.search));
  100.   helpFileURI = URI.helpFileURI;
  101.   var helpTopic = URI.topic;
  102.   helpBaseURI = helpFileURI.substring(0, helpFileURI.lastIndexOf("/")+1); // trailing "/" included.
  103.  
  104.   loadHelpRDF();
  105.  
  106.   displayTopic(helpTopic);  
  107.  
  108.   // move to right end of screen
  109.   var width = document.documentElement.getAttribute("width");
  110.   var height = document.documentElement.getAttribute("height");
  111.   window.moveTo(screen.availWidth-width, (screen.availHeight-height)/2);
  112.  
  113.   var sessionHistory =  Components.classes["@mozilla.org/browser/shistory;1"]
  114.                   .createInstance(Components.interfaces.nsISHistory);
  115.  
  116.   getWebNavigation().sessionHistory = sessionHistory;
  117.   window.XULBrowserWindow = new nsHelpStatusHandler();
  118.   // hook up UI through progress listener
  119.   var interfaceRequestor = helpBrowser.docShell.QueryInterface(Components.interfaces.nsIInterfaceRequestor);
  120.   var webProgress = interfaceRequestor.getInterface(Components.interfaces.nsIWebProgress);
  121.   webProgress.addProgressListener(window.XULBrowserWindow, Components.interfaces.nsIWebProgress.NOTIFY_ALL);
  122. }
  123.  
  124. function normalizeURI(uri) {
  125.   // uri in format [uri of help rdf file][?initial topic]
  126.   // if the whole uri or help file uri is omitted then the default help is assumed.
  127.   // unpack uri
  128.   var URI = {};
  129.   URI.helpFileURI = defaultHelpFile;
  130.   URI.topic = null;
  131.   // Case: No help uri at all.
  132.   if (uri) {
  133.     // remove leading ?
  134.     if (uri.substr(0,1) == "?") 
  135.       uri = uri.substr(1);
  136.     var i = uri.indexOf("?");
  137.     // Case: Full uri with topic.
  138.     if ( i != -1) {
  139.         URI.helpFileURI = uri.substr(0,i);
  140.         URI.topic = uri.substr(i+1);
  141.     }
  142.     else {
  143.       // Case: uri with no topic.
  144.       if (uri.substr(0,7) == "chrome:") 
  145.         URI.helpFileURI = uri;
  146.       else {
  147.         // Case: uri with topic only.
  148.         URI.topic = uri;
  149.       }  
  150.     }
  151.   }  
  152.   URI.uri = URI.helpFileURI + ((URI.topic)? "?" + URI.topic : "");
  153.   return URI;
  154. }
  155.  
  156. function loadHelpRDF() {
  157.   if (!helpFileDS) {
  158.     try {
  159.       helpFileDS = RDF.GetDataSourceBlocking(helpFileURI);
  160.     }
  161.     catch (e if (e.result == NSRESULT_RDF_SYNTAX_ERROR)) {
  162.       log("Help file: " + helpFileURI + " contains a syntax error.");
  163.     }
  164.     catch (e) {
  165.       log("Help file: " + helpFileURI + " was not found.");
  166.     }
  167.     try {
  168.       helpWindow.setAttribute("title", getAttribute(helpFileDS, RDF_ROOT, NC_TITLE, ""));
  169.       helpBaseURI = getAttribute(helpFileDS, RDF_ROOT, NC_BASE, helpBaseURI);
  170.       defaultTopic = getAttribute(helpFileDS, RDF_ROOT, NC_DEFAULTTOPIC, "welcome");
  171.  
  172.       var panelDefs = helpFileDS.GetTarget(RDF_ROOT, NC_PANELLIST, true);      
  173.       RDFContainer.Init(helpFileDS, panelDefs);
  174.       var iterator = RDFContainer.GetElements();
  175.         while (iterator.hasMoreElements()) {
  176.         var panelDef = iterator.getNext();
  177.         var panelID = getAttribute(helpFileDS, panelDef, NC_PANELID, null);        
  178.  
  179.         var datasources = getAttribute(helpFileDS, panelDef, NC_DATASOURCES, "rdf:none");
  180.         datasources = normalizeLinks(helpBaseURI, datasources);
  181.         // cache additional datsources to augment search datasources.
  182.         if (panelID == "search") {
  183.            emptySearchText = getAttribute(helpFileDS, panelDef, NC_EMPTY_SEARCH_TEXT, null) || "No search items found." ;        
  184.            emptySearchLink = getAttribute(helpFileDS, panelDef, NC_EMPTY_SEARCH_LINK, null) || "about:blank";        
  185.           searchDatasources = datasources;
  186.           datasources = "rdf:null"; // but don't try to display them yet!
  187.         }  
  188.  
  189.         // cache toc datasources for use by ID lookup.
  190.         var tree = document.getElementById("help-" + panelID + "-tree");
  191.         tree.setAttribute("datasources", datasources);
  192.         //if (panelID == "toc") {
  193.           if (tree.database) {
  194.             loadDatabases(tree.database, datasources);
  195.             tree.builder.rebuild();
  196.           }
  197.         //}
  198.       }  
  199.     }
  200.     catch (e) {
  201.       log(e + "");      
  202.     }
  203.   }
  204. }
  205. function loadDatabases(compositeDatabase, datasources) {
  206.   var ds = datasources.split(/\s+/);
  207.   for (var i=0; i < ds.length; ++i) {
  208.     if (ds[i] == "rdf:null" || ds[i] == "")
  209.       continue;
  210.     try {  
  211.       // we need blocking here to ensure the database is loaded so getLink(topic) works.
  212.       var datasource = RDF.GetDataSourceBlocking(ds[i]);
  213.       if (datasource)  
  214.         compositeDatabase.AddDataSource(datasource);
  215.     }
  216.     catch (e) {
  217.       log("Datasource: " + ds[i] + " was not found.");
  218.     }
  219.   }
  220. }
  221.  
  222. // prepend helpBaseURI to list of space separated links if the don't start with "chrome:"
  223. function normalizeLinks(helpBaseURI, links) {
  224.   if (!helpBaseURI)
  225.     return links;
  226.   var ls = links.split(/\s+/);
  227.   if (ls.length == 0)
  228.     return links;
  229.   for (var i=0; i < ls.length; ++i) {
  230.     if (ls[i] == "")
  231.       continue;
  232.     if (ls[i].substr(0,7) != "chrome:" && ls[i].substr(0,4) != "rdf:") 
  233.       ls[i] = helpBaseURI + ls[i];
  234.   }
  235.   return ls.join(" ");  
  236. }
  237.  
  238. function getLink(ID) {
  239.   if (!ID)
  240.     return null;
  241.   // Note resources are stored in fileURL#ID format.
  242.   // We have one possible source for an ID for each datasource in the composite datasource.
  243.   // The first ID which matches is returned.
  244.   var tocTree = document.getElementById("help-toc-tree");
  245.     tocDS = tocTree.database;
  246.     if (tocDS == null)
  247.       return null;
  248.     var tocDatasources = tocTree.getAttribute("datasources");
  249.   var ds = tocDatasources.split(/\s+/);
  250.   for (var i=0; i < ds.length; ++i) {
  251.     if (ds[i] == "rdf:null" || ds[i] == "")
  252.       continue;
  253.     try {
  254.       var rdfID = ds[i] + "#" + ID;
  255.       var resource = RDF.GetResource(rdfID);
  256.       if (resource) {
  257.         var link = tocDS.GetTarget(resource, NC_LINK, true);
  258.         if (link) {
  259.           link = link.QueryInterface(Components.interfaces.nsIRDFLiteral);
  260.           if (link) 
  261.             return link.Value;
  262.           else  
  263.             return null;
  264.         }  
  265.       }
  266.     }
  267.     catch (e) { log(rdfID + " " + e);}
  268.   }
  269.   return null;
  270. }
  271.  
  272. // Called by contextHelp.js to determine if this window is displaying the requested help file.
  273. function getHelpFileURI() {
  274.   return helpFileURI;
  275. }
  276.  
  277.  
  278. function getWebNavigation()
  279. {
  280.   return helpBrowser.webNavigation;
  281. }
  282.  
  283. function loadURI(uri)
  284. {
  285.   if (uri.substr(0,7) != "chrome:")
  286.     uri = helpBaseURI + uri;
  287.   const nsIWebNavigation = Components.interfaces.nsIWebNavigation;
  288.   getWebNavigation().loadURI(uri, nsIWebNavigation.LOAD_FLAGS_NONE, null, null, null);
  289. }
  290.  
  291. function goBack()
  292. {
  293.   var webNavigation = getWebNavigation();
  294.   if (webNavigation.canGoBack)
  295.     webNavigation.goBack();
  296. }
  297.  
  298. function goForward()
  299. {
  300.   var webNavigation = getWebNavigation();
  301.   if (webNavigation.canGoForward)
  302.     webNavigation.goForward();
  303. }
  304.  
  305. function goHome() {
  306.   // load "Welcome" page
  307.   displayTopic(defaultTopic);
  308. }
  309.  
  310. function print()
  311. {
  312.   try {
  313.     _content.print();
  314.   } catch (e) {
  315.   }
  316. }
  317.  
  318. function createBackMenu(event)
  319. {
  320.   return FillHistoryMenu(event.target, "back");
  321. }
  322.  
  323. function createForwardMenu(event)
  324. {
  325.   return FillHistoryMenu(event.target, "forward");
  326. }
  327.  
  328. function gotoHistoryIndex(aEvent)
  329. {
  330.   var index = aEvent.target.getAttribute("index");
  331.   if (!index)
  332.     return false;
  333.   try {
  334.     getWebNavigation().gotoIndex(index);
  335.   }
  336.   catch(ex) {
  337.     return false;
  338.   }
  339.   return true;
  340. }
  341.  
  342. function BrowserBack()
  343. {
  344.   try {
  345.     getWebNavigation().goBack();
  346.   }
  347.   catch(ex) {
  348.   }
  349.   UpdateBackForwardButtons();
  350. }
  351.  
  352. function BrowserForward()
  353. {
  354.   try {
  355.     getWebNavigation().goForward();
  356.   }
  357.   catch(ex) {
  358.   }
  359.   UpdateBackForwardButtons();
  360. }
  361.  
  362. function nsHelpStatusHandler()
  363. {
  364. }
  365.  
  366. nsHelpStatusHandler.prototype =
  367. {
  368.   onStateChange : function(aWebProgress, aRequest, aStateFlags, aStatus) {},
  369.   onProgressChange : function(aWebProgress, aRequest, aCurSelfProgress,
  370.                               aMaxSelfProgress, aCurTotalProgress, aMaxTotalProgress) {},
  371.   onSecurityChange : function(aWebProgress, aRequest, state) {},
  372.   onLocationChange : function(aWebProgress, aRequest, aLocation)
  373.   {
  374.     UpdateBackForwardButtons();
  375.   },
  376.   QueryInterface : function(aIID)
  377.   {
  378.     if (aIID.equals(Components.interfaces.nsIWebProgressListener) ||
  379.       aIID.equals(Components.interfaces.nsISupportsWeakReference) ||
  380.       aIID.equals(Components.interfaces.nsIXULBrowserWindow) ||
  381.       aIID.equals(Components.interfaces.nsISupports))
  382.       return this;
  383.     throw Components.results.NS_NOINTERFACE;
  384.   },
  385.   setJSStatus : function(status) {},
  386.   setJSDefaultStatus : function(status) {},
  387.   setOverLink : function(link) {}
  388. }
  389.  
  390. function UpdateBackForwardButtons()
  391. {
  392.   var backBroadcaster = document.getElementById("canGoBack");
  393.   var forwardBroadcaster = document.getElementById("canGoForward");
  394.   var webNavigation = getWebNavigation();
  395.  
  396.   // Avoid setting attributes on broadcasters if the value hasn't changed!
  397.   // Remember, guys, setting attributes on elements is expensive!  They
  398.   // get inherited into anonymous content, broadcast to other widgets, etc.!
  399.   // Don't do it if the value hasn't changed! - dwh
  400.  
  401.   var backDisabled = (backBroadcaster.getAttribute("disabled") == "true");
  402.   var forwardDisabled = (forwardBroadcaster.getAttribute("disabled") == "true");
  403.  
  404.   if (backDisabled == webNavigation.canGoBack)
  405.     backBroadcaster.setAttribute("disabled", !backDisabled);
  406.   
  407.   if (forwardDisabled == webNavigation.canGoForward)
  408.     forwardBroadcaster.setAttribute("disabled", !forwardDisabled);
  409. }
  410.  
  411. function find(again)
  412. {
  413.   var focusedWindow = document.commandDispatcher.focusedWindow;
  414.   if (!focusedWindow || focusedWindow == window)
  415.     focusedWindow = window._content;
  416.   if (again)
  417.     findAgainInPage(helpBrowser, window._content, focusedWindow);
  418.   else
  419.     findInPage(helpBrowser, window._content, focusedWindow)
  420. }
  421.  
  422. function getMarkupDocumentViewer()
  423. {
  424.   return helpBrowser.markupDocumentViewer;
  425. }
  426.  
  427. function BrowserReload()
  428. {
  429.   const reloadFlags = Components.interfaces.nsIWebNavigation.LOAD_FLAGS_NONE;
  430.   return BrowserReloadWithFlags(reloadFlags);
  431. }
  432.  
  433. function BrowserReloadWithFlags(reloadFlags)
  434. {
  435.    try {
  436.      /* Need to get SessionHistory from docshell so that
  437.       * reload on framed pages will work right. This 
  438.       * method should not be used for the context menu item "Reload frame".
  439.       * "Reload frame" should directly call into docshell as it does right now
  440.       */
  441.      var sh = getWebNavigation().sessionHistory;
  442.      var webNav = sh.QueryInterface(Components.interfaces.nsIWebNavigation);      
  443.      webNav.reload(reloadFlags);
  444.    }
  445.    catch(ex) {
  446.    }
  447.  }
  448.  
  449.  // doc=null for regular page info, doc=owner document for frame info 
  450.  function BrowserPageInfo(doc)
  451.  {
  452.    window.openDialog("chrome://navigator/content/pageInfo.xul",
  453.                      "_blank",
  454.                      "chrome,dialog=no",
  455.                      doc);
  456. }
  457.  
  458. function BrowserViewSource()
  459. {
  460.   var focusedWindow = document.commandDispatcher.focusedWindow;
  461.   if (focusedWindow == window)
  462.     focusedWindow = _content;
  463.  
  464.   if (focusedWindow)
  465.     var docCharset = "charset=" + focusedWindow.document.characterSet;
  466.  
  467.   BrowserViewSourceOfURL(_content.location, docCharset);
  468. }
  469.  
  470. function BrowserViewSourceOfURL(url, charset)
  471. {
  472.   // try to open a view-source window while inheriting the charset (if any)
  473.   openDialog("chrome://navigator/content/viewSource.xul",
  474.              "_blank",
  475.              "scrollbars,resizable,chrome,dialog=no",
  476.              url, charset);
  477. }
  478.  
  479. //Show the selected sidebar panel
  480. function showPanel(panelId) {
  481.   helpSearchPanel.setAttribute("hidden", "true");
  482.   helpTocPanel.setAttribute("hidden", "true");
  483.   helpIndexPanel.setAttribute("hidden", "true");
  484.   helpGlossaryPanel.setAttribute("hidden", "true");
  485.   var thePanel = document.getElementById(panelId);
  486.   thePanel.setAttribute("hidden","false");
  487. }
  488.  
  489. function onselect_loadURI(tree, columnName) {
  490.   try {
  491.     var row = tree.treeBoxObject.view.selection.currentIndex;
  492.     var properties = Components.classes["@mozilla.org/supports-array;1"].createInstance(Components.interfaces.nsISupportsArray);
  493.     tree.treeBoxObject.view.getCellProperties(row, columnName, properties);
  494.     if (!properties) return;
  495.     var uri = getPropertyValue(properties, "link-");
  496.     if (uri)
  497.       loadURI(uri);
  498.   }
  499.   catch (e) {}// when switching between tabs a spurious row number is returned.
  500. }
  501.  
  502. /** Search properties nsISupportsArray for an nsIAtom which starts with the given property name. **/
  503. function getPropertyValue(properties, propName) {
  504.   for (var i=0; i< properties.Count(); ++i) {
  505.     var atom = properties.GetElementAt(i).QueryInterface(Components.interfaces.nsIAtom);
  506.     var atomValue = atom.GetUnicode();
  507.     if (atomValue.substr(0, propName.length) == propName)
  508.       return atomValue.substr(propName.length);
  509.   }
  510.   return null;
  511. }
  512.  
  513. function doFind() {
  514.   var searchTree = document.getElementById("help-search-tree");
  515.   var findText = document.getElementById("findText");
  516.  
  517.   // clear any previous results.
  518.   clearDatabases(searchTree.database);
  519.  
  520.   // split search string into separate terms and compile into regexp's
  521.   RE = findText.value.split(/\s+/);
  522.   for (var i=0; i < RE.length; ++i) {
  523.     if (RE[i] == "")
  524.       continue;
  525.     if (RE[i].length > 3) {
  526.         RE[i] = new RegExp(RE[i].substring(0, RE[i].length-1) +"\w?", "i");
  527.     } else {
  528.         RE[i] = new RegExp(RE[i], "i");
  529.     }
  530.  
  531.   }
  532.  emptySearch = true;     
  533.   // search TOC
  534.   var resultsDS =  Components.classes["@mozilla.org/rdf/datasource;1?name=in-memory-datasource"].createInstance(Components.interfaces.nsIRDFDataSource);
  535.   var tree = document.getElementById("help-toc-tree");
  536.   var sourceDS = tree.database;
  537.   doFindOnDatasource(resultsDS, sourceDS, RDF_ROOT, 0);
  538.  
  539.   // search additional search datasources                                       
  540.   if (searchDatasources != "rdf:null") {
  541.     if (!searchDS)
  542.       searchDS = loadCompositeDS(searchDatasources);
  543.     doFindOnDatasource(resultsDS, searchDS, RDF_ROOT, 0);
  544.   }
  545.  
  546.   // search glossary.
  547.   tree = document.getElementById("help-glossary-tree");
  548.   sourceDS = tree.database;
  549.   if (!sourceDS) // If the glossary has never been displayed this will be null (sigh!).
  550.     sourceDS = loadCompositeDS(tree.datasources);
  551.   doFindOnDatasource(resultsDS, sourceDS, RDF_ROOT, 0);
  552.   
  553.   if (emptySearch)
  554.         assertSearchEmpty(resultsDS);
  555.   // Add the datasource to the search tree
  556.   searchTree.database.AddDataSource(resultsDS);
  557.   searchTree.builder.rebuild();
  558. }
  559.  
  560. function clearDatabases(compositeDataSource) {
  561.   var enumDS = compositeDataSource.GetDataSources()
  562.   while (enumDS.hasMoreElements()) {
  563.     var ds = enumDS.getNext();
  564.         compositeDataSource.RemoveDataSource(ds);
  565.   }
  566. }
  567.  
  568. function doFindOnDatasource(resultsDS, sourceDS, resource, level) {
  569.   if (level > MAX_LEVEL) {
  570.     try {
  571.       log("Recursive reference to resource: " + resource.Value + ".");
  572.     }
  573.     catch (e) {
  574.       log("Recursive reference to unknown resource.");
  575.     }
  576.     return;
  577.   }
  578.   // find all SUBHEADING children of current resource.
  579.   var targets = sourceDS.GetTargets(resource, NC_SUBHEADINGS, true);
  580.   while (targets.hasMoreElements()) {
  581.       var target (!si] erfacepAoren of currennts()) {
  582.       SUBHEADINt(i).QueryInterface(CorcerchDS = lo    varcepAorenMoreElemer-hrome:/wT u(sigh!).
  583. DaenMorUnents://wvR hts://wvts()) et (!si] erfacepAoren of currennts()) {
  584.       SUBcument.gvSa*TFRuerfCf(// ccNg/rdffffffffffffffffn Nnts()rar sourceDS     rray for   " erfacepAo(sigh docTo all SUBHEADING childr-oHeMRRec varcepAorenMoreEf dADINsourc sousrC=lrrenntsC=lrrenc = lo    varce"aseURI +I(uri);
  585.   }
  586. o.uame) {
  587. epAonul||
  588.  turn;
  589.     vaturn;
  590.     vaturn;
  591.   db(co-To all SUurn;
  592. o displ!
  593.     trych)
  594.         a.GB:.T"(tree.daHInPage((bx n)ce.
  595. S(seal*t, "i");
  596. eS)
  597. tCgetWe.T"(tree.dearch)
  598.         setPropertyValue(pADINGS, truenr webu  var sessetphil:s  // spli+hDatasourcrdocTo al z:asou  venMoych)
  599.         (tasourcrdocehDatao al e = guTtribStfOdeeDataSource(ds);
  600.   }
  601. }
  602.  
  603. fu(O,aFmozilla.org/suirce(dl e ucxe;
  604.   }s  // spli+hDatD e = guTtribStfOdeeDataSource(ds);
  605.   }
  606. }(sigogres {
  607.     var ds = enum    wg= enu}.nsp(num Ength);
  608.   }
  609.   return null;
  610. }
  611.  
  612. function doFi.L
  613.  
  614. function doFi.L
  615.  
  616. ctio   lopliC=lrreIgif the do }
  617. }(sigog= enu}.nsp(num Ength)on i!on().goBacfnM,, souriearchTree.builder.rebuild();
  618. }
  619.  
  620. .osourcon ;
  621. }
  622. pdr (emptyi  Engt.sHsExp(R(vpctioUiM"ety/Tearc(of: " CkufOdeeD1c(of:Ength);
  623. }(siw do);
  624. };E2neD1c(of:Engtitri= "rdf:"_;n-surc(vpctioUiM"HInPab"; i <.i0; ies(compoiAAp
  625.   e);
  626. r (emenu ies(Wxgtitri= "rdf:";
  627.     }
  628.     catch (e) {
  629.       log("Recompild();
  630. }
  631.  
  632. .rRecompild();
  633. }
  634.  
  635. .rRecompild);
  636. }
  637.  
  638. .omp4 mpild();
  639.  
  640. .r4 .rRecompi
  641. }2
  642. }(siw do)  }.rRourceDS,((cusedWeouriearchTree.buildersISuppt.sHsExISupptunctic
  643.  
  644. }(sunction doFindOnDataRec v+exc+resource,.GB:.T <.i0eew.geild);://wTorcon ;
  645. }
  646. pdr (emptyi -oHeMRn nfaces.nsIAtom);
  647. S, true);
  648.   we.np4 mp}nu ies(WxglioUiMa (e) {
  649.   Ta MRn nfaces.n(nues(Wxgtitri= "rdf:"; (signes(Wx
  650. }
  651.  
  652. udony (signes(Wx
  653. }s = sourceDS..interfaceoPRt.sHsExISupptunctic
  654.  
  655. }(sunction doFindOnDataRe
  656.    ri= "r}sHsExISptunctd
  657.   Ta MRn nfacPi);
  658.   hsnouriearchTree.buildersI nfac) soucxe;
  659.   }s unt; i <.i0;ga rcument.getElementById("help-glossary-tree"yDd();
  660. }
  661. rceDS..interfaceoPRt.sHsExISupptuE..in.sHsExIla.ofram-trarche.sp);
  662. snataSnMoreElemer--tree"yDd()cstenR comsn w;
  663. }
  664.  
  665. .osoiteDataozilland hx+_ erfacepAoren e;
  666. bao    sourc"Nree");
  667.     t  onLa=lemer-hrCaSnMoree.buildersI ncheesource.
  668.   st();
  669.   },ue;
  670. bao  4g  sober it k/T(urc sodatasFindOthe cum EngtMrrM)tri= ca <.i0eew.geilduE..iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii*m EngtMrrM)tri= ciiiiiiiiiiiiii ┬f ┬f ┬f ┬f ┬f ┬f ┬f ┬f ┬f =Q₧£properties.Count(); ++i) A▐ed sidebar panel
  671. function shoτß tasourcrdocehDatao al e = guTtribStfOdeeDataSource(ds);
  672. àCBtî8Q