nsCOMPtr<nsIRDFResource> resource; rv = gXULUtils->GetElementRefResource(aElement, getter_AddRefs(resource)); if (NS_SUCCEEDED(rv)) {    rv = CreateContainerContents(aElement, resource, PR_FALSE); if (NS_FAILED(rv)) return rv; }  return NS_OK;
return rv;
RDFGenericBuilderImpl::CreateContents(nsIContent* aElement){    NS_PRECONDITION(aElement != nsnull, "null ptr");    if (! aElement)        return NS_ERROR_NULL_POINTER;    // First, make sure that the element is in the right widget -- ours.    if (!IsElementInWidget(aElement))        return NS_OK;    nsresult rv;    // Create the current resource's contents from the template, if    // appropriate    nsAutoString templateID;    rv = aElement->GetAttribute(kNameSpaceID_None, kTemplateAtom, templateID);    if (NS_FAILED(rv)) return rv;    if (rv == NS_CONTENT_ATTR_HAS_VALUE) {        rv = CreateTemplateContents(aElement, templateID);        if (NS_FAILED(rv)) return rv;    }    nsCOMPtr<nsIRDFResource> resource;    rv = gXULUtils->GetElementRefResource(aElement, getter_AddRefs(resource));    if (NS_SUCCEEDED(rv)) {        // The element has a resource; that means that it corresponds        // to something in the graph, so we need to go to the graph to        // create its contents.        rv = CreateContainerContents(aElement, resource, PR_FALSE);        if (NS_FAILED(rv)) return rv;    }    return NS_OK;}