Re: sharing RDF datasource between iframes or through reload

Neil Deakin <[email protected]> Tue, 19 Apr 2005 17:28:37 -0400
Newsgroups gmane.comp.mozilla.devel.rdf
Organization Another Netscape Collabra Server User
Message-ID <[email protected]>
vaab wrote:
> This is what I observed and used, sorry for not understanding all you 
> might have explained ;), I understand that if my code is built on 
> javascript bugs, this is not really clean ;)
> 
> In a basic script I have this line :
> 
> var ds = RDF.GetDataSource("rdf:composite-datasource");
> 
> which I've read about, and is supposed to load a composite-datasource. 

That is the wrong way. That will create a datasource with the URL 
rdf:composite-datasource and return the same one every time you call it.

> 
> var memds = Components
> .classes["@mozilla.org/rdf/datasource;1?name=composite-datasource"]
> .createInstance(Components.interfaces.nsIRDFDataSource);

That is the right way.

/ Neil