channel->SetContentType(NS_LITERAL_CSTRING("text/xml"));
txCompileObserver::startLoad(nsIURI* aUri, txStylesheetCompiler* aCompiler,                             nsIURI* aReferrerURI){    nsCOMPtr<nsIChannel> channel;    nsresult rv = NS_NewChannel(getter_AddRefs(channel), aUri);    NS_ENSURE_SUCCESS(rv, rv);    channel->SetLoadGroup(mLoadGroup);    nsCOMPtr<nsIHttpChannel> httpChannel(do_QueryInterface(channel));    if (httpChannel) {        httpChannel->SetRequestHeader(NS_LITERAL_CSTRING("Accept"),                                      NS_LITERAL_CSTRING("text/xml,application/xml,application/xhtml+xml,*/*;q=0.1"),                                      PR_FALSE);        if (aReferrerURI) {            httpChannel->SetReferrer(aReferrerURI);        }    }    nsCOMPtr<nsIParser> parser = do_CreateInstance(kCParserCID, &rv);    NS_ENSURE_SUCCESS(rv, rv);    nsRefPtr<txStylesheetSink> sink = new txStylesheetSink(aCompiler, parser);    NS_ENSURE_TRUE(sink, NS_ERROR_OUT_OF_MEMORY);    channel->SetNotificationCallbacks(sink);    parser->SetCommand(kLoadAsData);    parser->SetContentSink(sink);    parser->Parse(aUri);    return channel->AsyncOpen(sink, parser);}