Loosing assertions
Neil Stansbury <[email protected]>
| Newsgroups | gmane.comp.mozilla.devel.rdf |
|---|---|
| Organization | Another Netscape Collabra Server User |
| Message-ID | <[email protected]> |
Hi all, I am loading a number of datasources from both local files and remote URLs into a composite datasource. The individual datasources are retrieved via: nsIRDFService.GetDataSource( nsIIOService.NewfileUri ) or nsIRDFService.GetDataSource( http URL ) I am now trying to assert changes manually into the composite ds rather than refreshing the entire remote datasources. The odd thing is when I assert() into the composite DS, I know the assertion works initially as I have CSS selectors that change as soon as the assertion completes. But when I check the value immediately after, it is as it was. For example: var nsIRDFService = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(); var nsIRDFService = nsIRDFService.QueryInterface(Components.interfaces.nsIRDFService); var subject = nsIRDFService.GetResource(subject); var predicate = nsIRDFService.GetResource(predicate); var object = CompDS.GetTarget(subject, predicate, true); var value = object.QueryInterface(Components.interfaces.nsIRDFLiteral); alert( value ); value = "new value" var literal = nsIRDFService.GetLiteral(value); CompDS.Assert(subject, predicate, literal, true); // Check object = CompDS.GetTarget(subject, predicate, true); value = object.QueryInterface(Components.interfaces.nsIRDFLiteral); alert( value ); // Still old value I am lost on this one, anyone got any thoughts? Cheers,