nsAutoString vcardName; vcardName.AssignWithConversion("VCARD_NAME");
nsAutoString vcardName; vcardName.Assign(NS_LITERAL_STRING("VCARD_NAME"));
wallet_CaptureInputElement(nsIDOMNode* elementNode, nsIDocument* doc) {  nsresult result;  PRBool captured = PR_FALSE;  nsCOMPtr<nsIDOMHTMLInputElement> inputElement = do_QueryInterface(elementNode);    if (inputElement) {    /* it's an input element */    nsAutoString type;    result = inputElement->GetType(type);    if ((NS_SUCCEEDED(result)) &&        (type.IsEmpty() || (type.CompareWithConversion("text", PR_TRUE) == 0))) {      nsAutoString field;      result = inputElement->GetName(field);      if (NS_SUCCEEDED(result)) {        nsAutoString value;        result = inputElement->GetValue(value);        if (NS_SUCCEEDED(result)) {          /* get schema name from vcard attribute if it exists */          nsAutoString schema;          nsCOMPtr<nsIDOMElement> element = do_QueryInterface(elementNode);          if (element) {            nsAutoString vcardName; vcardName.AssignWithConversion("VCARD_NAME");            nsAutoString vcardValue;            result = element->GetAttribute(vcardName, vcardValue);            if (NS_OK == result) {              nsVoidArray* dummy;              wallet_ReadFromList(vcardValue, schema, dummy, wallet_VcardToSchema_list, PR_FALSE);            }          }#ifdef IgnoreFieldNames// use displayable text instead of vcard namesschema.SetLength(0);#endif          if (!schema.Length()) {            /* get schema from displayable text if possible */            wallet_GetSchemaFromDisplayableText(inputElement, schema, (value.Length()==0));          }          if (wallet_Capture(doc, field, value, schema)) {            captured = PR_TRUE;          }        }      }    }  }  return captured;}