NS_WARNING("ignoring non-HTML attribute on HTML tag");
PR_LOG(gLog, PR_LOG_ALWAYS, ("ignoring non-HTML attribute on HTML tag"));
RDFXULBuilderImpl::AddAttribute(nsIContent* aElement,                                nsIRDFResource* aProperty,                                nsIRDFNode* aValue){    nsresult rv;    // First, split the property into its namespace and tag components    PRInt32 nameSpaceID;    nsCOMPtr<nsIAtom> tag;    if (NS_FAILED(rv = mDocument->SplitProperty(aProperty, &nameSpaceID, getter_AddRefs(tag)))) {        NS_ERROR("unable to split resource into namespace/tag pair");        return rv;    }    if (IsHTMLElement(aElement)) {        // XXX HTML elements are picky and only want attributes from        // certain namespaces.        switch (nameSpaceID) {        case kNameSpaceID_HTML:        case kNameSpaceID_None:        case kNameSpaceID_Unknown:            break;        default:            NS_WARNING("ignoring non-HTML attribute on HTML tag");            return NS_OK;        }    }    nsCOMPtr<nsIRDFResource> resource;    nsCOMPtr<nsIRDFLiteral> literal;    // Now we need to figure out the attributes value and actually set    // it on the element. What we do differs a bit depending on    // whether we're aValue is a resource or a literal.    if (NS_SUCCEEDED(rv = aValue->QueryInterface(kIRDFResourceIID,                                                 (void**) getter_AddRefs(resource)))) {        nsXPIDLCString uri;        resource->GetValue( getter_Copies(uri) );        rv = aElement->SetAttribute(nameSpaceID, tag, (const char*) uri, PR_TRUE);    }    else if (NS_SUCCEEDED(rv = aValue->QueryInterface(kIRDFLiteralIID,                                                      (void**) getter_AddRefs(literal)))) {        nsXPIDLString s;        literal->GetValue( getter_Copies(s) );        rv = aElement->SetAttribute(nameSpaceID, tag, (const PRUnichar*) s, PR_TRUE);    }    else {        // This should _never_ happen.        NS_ERROR("uh, this isn't a resource or a literal!");        rv = NS_ERROR_UNEXPECTED;    }    return rv;}