if (NS_FAILED(rv = element->GetAttribute(kNameSpaceID_RDF, kContainmentAtom, uri))) {
if (NS_FAILED(rv = element->GetAttribute(kNameSpaceID_None, kContainmentAtom, uri))) {
RDFTreeBuilderImpl::IsTreeProperty(nsIContent* aElement, nsIRDFResource* aProperty){    // XXX is this okay to _always_ treat ordinal properties as tree    // properties? Probably not...    if (rdf_IsOrdinalProperty(aProperty))        return PR_TRUE;    nsresult rv;    const char* propertyURI;    if (NS_FAILED(rv = aProperty->GetValue(&propertyURI))) {        NS_ERROR("unable to get property URI");        return PR_FALSE;    }    nsAutoString uri;    nsCOMPtr<nsIContent> element( do_QueryInterface(aElement) );    while (element) {        // Never ever ask an HTML element about non-HTML attributes.        PRInt32 nameSpaceID;        if (NS_FAILED(rv = element->GetNameSpaceID(nameSpaceID))) {            NS_ERROR("unable to get element namespace");            PR_FALSE;        }        if (nameSpaceID != kNameSpaceID_HTML) {            // Is this the "rdf:containment? property?            if (NS_FAILED(rv = element->GetAttribute(kNameSpaceID_RDF, kContainmentAtom, uri))) {                NS_ERROR("unable to get attribute value");                return PR_FALSE;            }            if (rv == NS_CONTENT_ATTR_HAS_VALUE) {                // Okay we've found the locally specified tree properties,                // a whitespace-separated list of property URIs. So we                // definitively know whether this is a tree property or                // not.                if (uri.Find(propertyURI) >= 0)                    return PR_TRUE;                else                    return PR_FALSE;            }        }        nsCOMPtr<nsIContent> parent;        element->GetParent(*getter_AddRefs(parent));        element = parent;    }    // If we get here, we didn't find any tree property: so now    // defaults start to kick in.    //#define TREE_PROPERTY_HACK#if defined(TREE_PROPERTY_HACK)    if ((aProperty == kNC_child) ||        (aProperty == kNC_Folder) ||        (aProperty == kRDF_child)) {        return PR_TRUE;    }    else#endif // defined(TREE_PROPERTY_HACK)        return PR_FALSE;}