rv = EnsureCell(aTreeItemElement, index, getter_AddRefs(cellElement));
rv = EnsureCell(treerow, index, getter_AddRefs(cellElement));
RDFTreeBuilderImpl::SetWidgetAttribute(nsIContent* aTreeItemElement,                                       nsIRDFResource* aProperty,                                       nsIRDFNode* aValue){    nsresult rv;    // figure out the textual value that we want to use    nsAutoString value;    rv = nsRDFContentUtils::GetTextForNode(aValue, value);    // see if it's a cell in the tree    PRInt32 index;    if (NS_SUCCEEDED(rv = GetColumnForProperty(mRoot, aProperty, &index))) {        // ...yep.        nsCOMPtr<nsIContent> cellElement;        rv = EnsureCell(aTreeItemElement, index, getter_AddRefs(cellElement));        NS_ASSERTION(NS_SUCCEEDED(rv), "unable to ensure cell exists");        if (NS_FAILED(rv)) return rv;        nsCOMPtr<nsITextContent> text;        rv = FindTextElement(cellElement, getter_AddRefs(text));        if (NS_FAILED(rv)) return rv;        if (text) {            rv = text->SetText(value.GetUnicode(), value.Length(), PR_TRUE);        }        else {            rv = nsRDFContentUtils::AttachTextNode(cellElement, aValue);        }        if (NS_FAILED(rv)) return rv;    }    // no matter what, it's also been set as an attribute.    PRInt32 nameSpaceID;    nsCOMPtr<nsIAtom> tagAtom;    rv = mDocument->SplitProperty(aProperty, &nameSpaceID, getter_AddRefs(tagAtom));    if (NS_FAILED(rv)) return rv;    rv = aTreeItemElement->SetAttribute(nameSpaceID, tagAtom, value, PR_TRUE);    if (NS_FAILED(rv)) return rv;    return NS_OK;}