nsFixedString uri(buf, NS_ARRAY_LENGTH(buf), 0);
nsAutoString uri(CBufDescriptor(buf, PR_TRUE, sizeof(buf) / sizeof(PRUnichar), 0));
nsXULContentUtils::GetElementRefResource(nsIContent* aElement, nsIRDFResource** aResult){    *aResult = nsnull;    // Perform a reverse mapping from an element in the content model    // to an RDF resource. Check for a "ref" attribute first, then    // fallback on an "id" attribute.    nsresult rv;    PRUnichar buf[128];    nsFixedString uri(buf, NS_ARRAY_LENGTH(buf), 0);    rv = aElement->GetAttr(kNameSpaceID_None, nsXULAtoms::ref, uri);    NS_ASSERTION(NS_SUCCEEDED(rv), "severe error retrieving attribute");    if (NS_FAILED(rv)) return rv;    if (rv == NS_CONTENT_ATTR_HAS_VALUE) {        // We'll use rdf_MakeAbsolute() to translate this to a URL.        nsCOMPtr<nsIDocument> doc = aElement->GetDocument();        nsIURI *url = doc->GetDocumentURI();        NS_ASSERTION(url != nsnull, "element has no document");        if (! url)            return NS_ERROR_UNEXPECTED;        // N.B. that if this fails (e.g., because necko doesn't grok        // the protocol), uriStr will be untouched.        NS_MakeAbsoluteURI(uri, uri, url);        rv = gRDF->GetUnicodeResource(uri, aResult);    }    else {        rv = GetElementResource(aElement, aResult);    }    return rv;}