if (NS_FAILED(rc)) return rc;
NS_ENSURE_SUCCESS(rc, rc);
static nsresult HasSimpleValue(nsISchemaType * aSchemaType, PRBool * aResult) {  PRUint16 typevalue;  nsresult rc = aSchemaType->GetSchemaType(&typevalue);  if (NS_FAILED(rc))    return rc;  if (typevalue == nsISchemaComplexType::SCHEMA_TYPE_COMPLEX) {    nsCOMPtr<nsISchemaComplexType> ct = do_QueryInterface(aSchemaType);    rc = ct->GetContentModel(&typevalue);    if (NS_FAILED(rc))      return rc;    *aResult = typevalue == nsISchemaComplexType::CONTENT_MODEL_SIMPLE;  } else {    *aResult = PR_TRUE;  }  return NS_OK;}