From:  Neil Stansbury <>
Date:  25 May 2005 00:46:34 Hong Kong Time

Datasource notifications via nsIRDFXMLParser


I am loading remote rdf into an In-Mem-DS with the
nsIRDFXMLParser.parseAsync() method where I pass the returned
nsIStreamListener into an nsIHttpChannel.asyncOpen() method:

var nsIStreamListener = nsIRDFXMLParser.parseAsync( Ds, baseUri );

nsIHttpChannel.requestMethod = "GET";
nsIHttpChannel.notificationCallbacks = nsIRequestor;
nsIHttpChannel.asyncOpen( nsIStreamListener, null );

My nsIProgressEventSink methods on the channel gets called fine, but I
need to get some form of "onEndLoad()" notification when the data has
been retrieved and parsed by the Ds. The only way I can see is by
wrapping the nsIStreamListener and forwarding the calls - but there must
be a better way??

I can't use a composite-ds's GetDataSource() (and thus sinkObserver) as
the request Uri has arguments encoded in it, and so generates a new ds
for each request.