NS_NOTYETIMPLEMENTED("write me!"); return NS_ERROR_NOT_IMPLEMENTED;
NS_PRECONDITION(aReturn != nsnull, "null ptr"); if (! aReturn) return NS_ERROR_NULL_POINTER;   NS_PRECONDITION(mDocumentURL != nsnull, "not initialized"); if (! mDocumentURL) return NS_ERROR_NOT_INITIALIZED;  nsresult rv;  nsCOMPtr<nsIAtom> name; PRInt32 nameSpaceID;   rv = ParseTagString(aTagName, *getter_AddRefs(name), nameSpaceID); NS_ASSERTION(NS_SUCCEEDED(rv), "unable to parse tag name"); if (NS_FAILED(rv)) return rv;   nsCOMPtr<nsIContent> result; rv = NS_NewRDFElement(nameSpaceID, name, getter_AddRefs(result)); if (NS_FAILED(rv)) return rv;    nsCOMPtr<nsIRDFResource> resource; const char* context; rv = mDocumentURL->GetSpec(&context); if (NS_FAILED(rv)) return rv;  rv = rdf_CreateAnonymousResource(context, getter_AddRefs(resource)); if (NS_FAILED(rv)) return rv;  nsXPIDLCString uri; rv = resource->GetValue(getter_Copies(uri)); if (NS_FAILED(rv)) return rv;  rv = result->SetAttribute(kNameSpaceID_None, kIdAtom, (const char*) uri, PR_FALSE); NS_ASSERTION(NS_SUCCEEDED(rv), "unable to set element's ID"); if (NS_FAILED(rv)) return rv;    nsCOMPtr<nsIRDFResource> type; rv = MakeProperty(nameSpaceID, name, getter_AddRefs(type)); if (NS_FAILED(rv)) return rv;  rv = mDocumentDataSource->Assert(resource, kRDF_type, type, PR_TRUE); NS_ASSERTION(NS_SUCCEEDED(rv), "unable to set element's tag info in graph"); if (NS_FAILED(rv)) return rv;   rv = mDocumentDataSource->Assert(resource, kRDF_instanceOf, kXUL_element, PR_TRUE); NS_ASSERTION(rv == NS_OK, "unable to mark as XUL element"); if (NS_FAILED(rv)) return rv;  rv = rdf_MakeSeq(mDocumentDataSource, resource); NS_ASSERTION(rv == NS_OK, "unable to mark as XUL element"); if (NS_FAILED(rv)) return rv;   rv = result->SetDocument(this, PR_FALSE); if (NS_FAILED(rv)) return rv;   rv = result->QueryInterface(nsIDOMElement::GetIID(), (void**) aReturn); NS_ASSERTION(NS_SUCCEEDED(rv), "not a DOM element"); if (NS_FAILED(rv)) return rv;  return NS_OK;
XULDocumentImpl::CreateElement(const nsString& aTagName, nsIDOMElement** aReturn){    NS_NOTYETIMPLEMENTED("write me!");    return NS_ERROR_NOT_IMPLEMENTED;}