nsAutoString prefix; entry->Prefix->ToString(prefix); rdf_BlockingWrite(aStream, prefix);
if (entry->Prefix) { rdf_BlockingWrite(aStream, ":", 1); nsAutoString prefix; entry->Prefix->ToString(prefix); rdf_BlockingWrite(aStream, prefix); }
RDFXMLDataSourceImpl::SerializePrologue(nsIOutputStream* aStream){static const char kXMLVersion[] = "<?xml version=\"1.0\"?>\n";static const char kOpenRDF[]  = "<RDF:RDF";static const char kXMLNS[]    = "\n     xmlns:";    rdf_BlockingWrite(aStream, kXMLVersion, sizeof(kXMLVersion) - 1);    PRInt32 i;    // Write out style sheet processing instructions    for (i = 0; i < mNumCSSStyleSheetURLs; ++i) {static const char kCSSStyleSheet1[] = "<?xml-stylesheet href=\"";static const char kCSSStyleSheet2[] = "\" type=\"text/css\"?>\n";        const char* url;        mCSSStyleSheetURLs[i]->GetSpec(&url);        rdf_BlockingWrite(aStream, kCSSStyleSheet1, sizeof(kCSSStyleSheet1) - 1);        rdf_BlockingWrite(aStream, url);        rdf_BlockingWrite(aStream, kCSSStyleSheet2, sizeof(kCSSStyleSheet2) - 1);    }    // Write out named data source processing instructions    for (i = 0; i < mNumNamedDataSourceURIs; ++i) {static const char kNamedDataSource1[] = "<?rdf-datasource href=\"";static const char kNamedDataSource2[] = "\"?>\n";        rdf_BlockingWrite(aStream, kNamedDataSource1, sizeof(kNamedDataSource1) - 1);        rdf_BlockingWrite(aStream, mNamedDataSourceURIs[i]);        rdf_BlockingWrite(aStream, kNamedDataSource2, sizeof(kNamedDataSource2) - 1);    }    // global name space declarations    rdf_BlockingWrite(aStream, kOpenRDF, sizeof(kOpenRDF) - 1);    for (NameSpaceMap* entry = mNameSpaces; entry != nsnull; entry = entry->Next) {        rdf_BlockingWrite(aStream, kXMLNS, sizeof(kXMLNS) - 1);        nsAutoString prefix;        entry->Prefix->ToString(prefix);        rdf_BlockingWrite(aStream, prefix);        rdf_BlockingWrite(aStream, "=\"", 2);        rdf_BlockingWrite(aStream, entry->URI);        rdf_BlockingWrite(aStream, "\"", 1);    }    rdf_BlockingWrite(aStream, ">\n", 2);    return NS_OK;}