rdf_MakeRelativeRef(NS_ConvertUTF8toUCS2(mURLSpec), uri);
rdf_MakeRelativeRef(NS_ConvertUTF8toUCS2(mOriginalURLSpec.get()), uri);
RDFXMLDataSourceImpl::SerializeDescription(nsIOutputStream* aStream,                                           nsIRDFResource* aResource){static const char kRDFDescriptionAbout[] = "  <RDF:Description about=\"";static const char kRDFDescriptionID[]    = "  <RDF:Description ID=\"";static const char kRDFDescription2[] = "\">\n";static const char kRDFDescription3[] = "  </RDF:Description>\n";    nsresult rv;    // XXX Look for an "RDF:type" property: if one exists, then output    // as a "typed node" instead of the more verbose "RDF:Description    // type='...'".    nsXPIDLCString s;    rv = aResource->GetValue(getter_Copies(s));    if (NS_FAILED(rv)) return rv;    nsAutoString uri = NS_ConvertUTF8toUCS2(s);    rdf_MakeRelativeRef(NS_ConvertUTF8toUCS2(mURLSpec), uri);    rdf_EscapeAttributeValue(uri);    if (uri[0] == PRUnichar('#')) {        uri.Cut(0, 1);        rdf_BlockingWrite(aStream, kRDFDescriptionID, sizeof(kRDFDescriptionID) - 1);    }    else {        rdf_BlockingWrite(aStream, kRDFDescriptionAbout, sizeof(kRDFDescriptionAbout) - 1);    }    rdf_BlockingWrite(aStream, uri);    rdf_BlockingWrite(aStream, kRDFDescription2, sizeof(kRDFDescription2) - 1);    nsCOMPtr<nsISimpleEnumerator> arcs;    nsCOMPtr<nsISupportsArray> array;    rv = mInner->ArcLabelsOut(aResource, getter_AddRefs(arcs));    if (NS_FAILED(rv)) goto done;	rv = NS_NewISupportsArray(getter_AddRefs(array));    if (NS_FAILED(rv)) goto done;    while (1) {        PRBool hasMore;        rv = arcs->HasMoreElements(&hasMore);        if (NS_FAILED(rv)) break;        if (! hasMore)            break;        nsCOMPtr<nsISupports> isupports;        rv = arcs->GetNext(getter_AddRefs(isupports));        if (NS_FAILED(rv)) return rv;        nsCOMPtr<nsIRDFResource> property = do_QueryInterface(isupports);        NS_ASSERTION(property != nsnull, "not an nsIRDFResource!");        if (! property)            continue;        // have we already seen this resource?  If so, don't write it out again        if (array->IndexOf(property) >= 0)            continue;        array->AppendElement(property);        if (! IsContainerProperty(property)) {            // Ignore properties that pertain to containers; we may be            // called from SerializeContainer() if the container            // resource has been assigned non-container properties.            rv = SerializeProperty(aStream, aResource, property);        }        if (NS_FAILED(rv))            break;    }    rv = NS_OK; done:    rdf_BlockingWrite(aStream, kRDFDescription3, sizeof(kRDFDescription3) - 1);    return rv;}