home *** CD-ROM | disk | FTP | other *** search
/ PC World 2000 December / PCWorld_2000-12_cd.bin / Komunikace / mozilla / mozilla-win32-M18-mathml-svg-xslt.exe / res / rdf / xpidl-test-1.xul < prev   
Extensible Markup Language  |  2000-09-20  |  1KB  |  52 lines

  1. <?xml version="1.0"?>
  2. <?xml-stylesheet href="resource:/res/samples/xul.css" type="text/css"?>
  3.  
  4. <xul:window
  5.   xmlns:html="http://www.w3.org/1999/xhtml"
  6.   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  7.   xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
  8.  
  9. <html:script>
  10. function RenamePersonalToolbar()
  11. {
  12.   var db = document.getElementById("tree").database;
  13.  
  14.   var personalToolbarFolder =
  15.         document.rdf.GetResource("NC:PersonalToolbarFolder");
  16.  
  17.   var NC_name =
  18.         document.rdf.GetResource("http://home.netscape.com/NC-rdf#Name");
  19.  
  20.   var oldNameLiteral = db.GetTarget(personalToolbarFolder, NC_name, true);
  21.  
  22.   dump("old name was " + oldNameLiteral + "\n");
  23.   
  24.   var newName = 
  25.         document.rdf.GetLiteral("Hello, goof ball");
  26.   
  27.   db.Assert(personalToolbarFolder, NC_name, newName, true);
  28. }
  29.  
  30. </html:script>
  31.  
  32. <html:button onclick="RenamePersonalToolbar();">Remove Personal Toolbar</html:button>
  33.  
  34. <tree id="tree" datasources="rdf:bookmarks" onclick="return OpenURL(event,event.target.parentNode);">
  35.   <treecolgroup>
  36.     <treecol resource="http://home.netscape.com/NC-rdf#Name" flex="1"/>
  37.     <treecol resource="http://home.netscape.com/NC-rdf#URL" flex="1"/>
  38.   </treecolgroup>
  39.   <treehead>
  40.     <treeitem>
  41.       <treecell>Name</treecell>
  42.       <treecell>URL</treecell>
  43.     </treeitem>
  44.   </treehead>
  45.  
  46.   <treebody id="NC:BookmarksRoot">
  47.   </treebody>
  48.   <treechildren flex="1"/>
  49. </tree>
  50.  
  51. </xul:window>
  52.