[Jslib] question on construct of RDF using rdf.js module.

Frank Koenen fkoenen at virtualmonet.com
Thu Mar 18 16:45:40 EST 2004


Can anyone offer how I could effect the same output RDF as below, except without the anonymous resource names?

Using the code below, I end up with resource names like: 'resource="rdf:#$O3hjH1:urn:a"'. Not very usable in the
end. 

     1     include('chrome://jslib/content/rdf/rdfFile.js');
     2
     3     var rdf = new RDFFile("/tmp/5.rdf", null, 'http://www.frank.com/me#', 'medrepublic');
     4     if ( rdf.loaded ) {
     5        var node = rdf.getNode("urn:me");
     6        var ccc = node.addContainer('medrepublic:links');
     7        var na = ccc.addNode('urn:a'); na.setAttribute('medrepublic:name','afrank');
     8        var nb = ccc.addNode('urn:b'); nb.setAttribute('medrepublic:name','blarry');
     9        var nc = ccc.addNode('urn:c'); nc.setAttribute('medrepublic:name','cschemp');
    10        rdf.flush();

Thanks.

-- 
Frank Koenen
Dir. of Tech. Services
Monet Technologies Inc.
Email: fkoenen at virtualmonet.com Voice:1-312-372-7500 x204 Fax:1-312-372-6020
Visit us on the web: WWW.VIRTUALMONET.COM



More information about the Jslib mailing list