if (NS_FAILED(rv = CreateElement(resource, getter_AddRefs(child)))) {
if (NS_FAILED(rv = CreateElement(nameSpace, resource, getter_AddRefs(child)))) {
RDFXULBuilderImpl::AppendChild(nsIContent* aElement,                               nsIRDFNode* aValue){    nsresult rv;    // Add the specified node as a child container of this    // element. What we do will vary slightly depending on whether    // aValue is a resource or a literal.    nsCOMPtr<nsIRDFResource> resource;    nsCOMPtr<nsIRDFLiteral> literal;    if (NS_SUCCEEDED(rv = aValue->QueryInterface(kIRDFResourceIID,                                                 (void**) getter_AddRefs(resource)))) {        // If it's a resource, then add it as a child container.        nsCOMPtr<nsIContent> child;        if (NS_FAILED(rv = CreateElement(resource, getter_AddRefs(child)))) {            NS_ERROR("unable to create new XUL element");            return rv;        }        if (NS_FAILED(rv = aElement->AppendChildTo(child, PR_TRUE))) {            NS_ERROR("unable to add element to content model");            return rv;        }    }    else if (NS_SUCCEEDED(rv = aValue->QueryInterface(kIRDFLiteralIID,                                                      (void**) getter_AddRefs(literal)))) {        // If it's a literal, then add it as a simple text node.        if (NS_FAILED(rv = nsRDFContentUtils::AttachTextNode(aElement, literal))) {            NS_ERROR("unable to add text to content model");            return rv;        }    }    else {        // This should _never_ happen        NS_ERROR("node is not a value or a resource");        return NS_ERROR_UNEXPECTED;    }    return NS_OK;}