Index: openid_client_ax.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/openid_client_ax/openid_client_ax.module,v
retrieving revision 1.2
diff -u -p -r1.2 openid_client_ax.module
--- openid_client_ax.module	17 Oct 2008 16:59:13 -0000	1.2
+++ openid_client_ax.module	17 Apr 2009 15:25:21 -0000
@@ -5,11 +5,6 @@
  * @file
  * Module providing openid client attribute exchange capability for Drupal
  */
-define('OPENID_CLIENT_AX_PATH',    drupal_get_path('module', 'openid_client_ax'));
-define('OPENID_CLIENT_AX_ENABLED', variable_get('openid_client_ax_enabled', false));
-define('OPENID_CLIENT_AX_ALIAS',   variable_get('openid_client_ax_alias', 'ax'));
-define('OPENID_CLIENT_AX_DOMAIN',  variable_get('openid_client_ax_domain', 'openid.net'));
-define('OPENID_CLIENT_AX_FIELDS',  variable_get('openid_client_ax_fields', ''));
 
 /**
  * Implementation of hook_perm().
@@ -45,29 +40,12 @@ function openid_client_ax_menu_alter(&$c
  */
 function openid_client_ax_openid($op, $request = array()) {
   // add our information to the request if op is request and we are enabled
-  if ($op == 'request' && OPENID_CLIENT_AX_ENABLED) {
-    $request[sprintf('openid.ns.%s', OPENID_CLIENT_AX_ALIAS)] = 'http://openid.net/srv/ax/1.0';
-    $request[sprintf('openid.%s.mode', OPENID_CLIENT_AX_ALIAS)] = 'fetch_request';
-    $required = $optional = array();
-    $fields = explode("\n", OPENID_CLIENT_AX_FIELDS);
-    foreach ($fields as $field) {
-      $row = explode("|", $field);
-      $request[sprintf($row[1], OPENID_CLIENT_AX_ALIAS)] = sprintf($row[2], OPENID_CLIENT_AX_DOMAIN);
-      if ($row[4]) {
-        $required[] = $row[3];
-      }
-      else {
-        $optional[] = $row[3];
-      }
-    }
-    // if we have required fields then we make sure we put them in
-    if (count($required)) {
-      $request[sprintf('openid.%s.required', OPENID_CLIENT_AX_ALIAS)] = implode(",", $required);
-    }
-    // if we have optional fields then we make sure we put them in
-    if (count($optional)) {
-      $request[sprintf('openid.%s.if_available', OPENID_CLIENT_AX_ALIAS)] = implode(",", $optional);
-    }
+  if ($op == 'request' && variable_get('openid_client_ax_enabled', TRUE)) {
+    $request[sprintf('openid.ns.%s', variable_get('openid_client_ax_alias', 'ax'))] = 'http://openid.net/srv/ax/1.0';
+    $request[sprintf('openid.%s.mode', variable_get('openid_client_ax_alias', 'ax'))] = 'fetch_request';
+    $mapping = array();
+    openid_cp_field_get_mapping($mapping);
+    $request[sprintf('openid.%s.if_available', variable_get('openid_client_ax_alias', 'ax'))] = implode(",", array_keys($mapping));
   }
   return $request;
 }
@@ -80,30 +58,22 @@ function openid_client_ax_admin_settings
   $form['openid_client_ax']['openid_client_ax_enabled'] = array(
     '#type'          => 'checkbox',
     '#title'         => t('Enable Attribute Exchange'),
-    '#default_value' => OPENID_CLIENT_AX_ENABLED,
+    '#default_value' => variable_get('openid_client_ax_enabled', FALSE),
     '#description'   => t('Enable the attribute exchange for OpenID'),
   );
   $form['openid_client_ax']['openid_client_ax_alias'] = array(
     '#type'          => 'textfield',
     '#title'         => t('Namespace to utilize for Attribute Exchange'),
-    '#default_value' => OPENID_CLIENT_AX_ALIAS,
+    '#default_value' => variable_get('openid_client_ax_alias', 'ax'),
     '#description'   => t('Per OpenID Specification you can specify your own namespace for attribute exchange that way you are guaranteed to always get your information back without conflicting with another'),
   );
   $form['openid_client_ax']['openid_client_ax_domain'] = array(
     '#type'          => 'textfield',
     '#title'         => t('Domain for AX definitions'),
-    '#default_value' => OPENID_CLIENT_AX_DOMAIN,
+    '#default_value' => variable_get('openid_client_ax_domain', 'openid.net'),
     '#description'   => t('Prefix domain to use for ax definitions since some providers use different domains than the standard ones'),
   );
-  $form['openid_client_ax']['openid_client_ax_fields'] = array(
-    '#type'          => 'textarea',
-    '#title'         => t('OpenID / Drupal Field Mappings'),
-    '#default_value' => OPENID_CLIENT_AX_FIELDS,
-    '#rows'          => 10,
-    '#description'   => t('Field mappings between the drupal system fields and the openid fields. Any fields in here will be requested by the openid ax. Format drupalfield|openidfield|openidnamespace|openidname|required where required will be 1 (required) or 0 (optional)'),
-  );
   return system_settings_form($form);
-
 }
 
 /**
@@ -174,7 +144,7 @@ function openid_client_ax_authentication
         drupal_goto();
       }
       user_external_login($account);
-      if (OPENID_CLIENT_AX_ENABLED) {
+      if (variable_get('openid_client_ax_enabled', FALSE)) {
         // update user and profile fields if the module is enabled in admin settings
         openid_client_ax_user_update($response, $account);
       }
@@ -199,7 +169,7 @@ function openid_client_ax_authentication
 function openid_client_ax_user_update($response = array(), $account) {
   if (module_exists('content_profile')) {
     $profile = new StdClass();
-    $types = content_profile_get_types('names');
+    $types = array_keys(content_profile_get_types('names'));
     foreach ($types as $type) {
       $profile->type = $type;
       break;
@@ -207,15 +177,432 @@ function openid_client_ax_user_update($r
     $profile->uid = $account->uid;
     node_submit($profile);
     // go through all of the returned attributes and save them for the user
-    $fields = explode("\n", OPENID_CLIENT_AX_FIELDS);
-    foreach ($fields as $field) {
-      $row = explode("|", $field);
-      $field_name = $row[0];
+    $mapping = array();
+    openid_cp_field_get_mapping($mapping);
+    foreach ($mapping as $openid => $node) {
       // replacing the type for value so we can retrieve the value from the system
-      $field_value = $response[str_replace('type', 'value', $row[1])];
-      $profile->$field_name['#value'] = $field_value;
+      $field_value = $response[str_replace('type', 'value', $openid)];
+      $profile->$node = array();
+      // Check if it's a CCK field or not
+      if (strstr($node, 'field_')) {
+        $profile->{$node}[0]['value'] = $field_value;
+      }
+      else {
+        $profile->{$node} = $field_value;
+      }
+    }
+    if (!isset($profile->title)) {
+      $profile->title = $account->name;
     }
     node_save($profile);
-    drupal_goto('user/'. $profile->nid .'/edit', 'destination=user/'. $account->uid);
   }
 }
+
+/**
+ * Create an array containing the identifiers as listed in
+ * http://www.axschema.org/types/
+ *
+ * @return
+ *   Array containing the schema definitions
+ */
+function openid_client_ax_schema_definitions() {
+  static $attributes = array();
+
+  // If already set return the array.
+  if (count($attributes)) {
+    return $attributes;
+  }
+
+  $attributes = array(
+    'http://axschema.org/namePerson' => array(
+      'identifier'  => 1,
+      'label'       => t('Full Name'),
+      'description' => t('Full name of subject'),
+      'type'        => 'http://www.w3.org/2001/XMLSchema#normalizedString',
+      'sreg'        => 'openid.sreg.fullname',
+      'section'     => t('Name'),
+    ),
+    'http://axschema.org/namePerson/prefix' => array(
+      'identifier'  => 2,
+      'label'       => t('Name prefix'),
+      'description' => t('Honorific prefix for the subject\'s name; i.e. "Mr.", "Mrs.", "Dr."'),
+      'type'        => 'http://www.w3.org/2001/XMLSchema#normalizedString',
+      'section'     => t('Name'),
+    ),
+    'http://axschema.org/namePerson/first' => array(
+      'identifier'  => 3,
+      'label'       => t('First name'),
+      'description' => t('First or given name of subject'),
+      'type'        => 'http://www.w3.org/2001/XMLSchema#normalizedString',
+      'section'     => t('Name'),
+    ),
+    'http://axschema.org/namePerson/last' => array(
+      'identifier'  => 4,
+      'label'       => t('Last name'),
+      'description' => t('Last name or surname of subject'),
+      'type'        => 'http://www.w3.org/2001/XMLSchema#normalizedString',
+      'section'     => t('Name'),
+    ),
+    'http://axschema.org/namePerson/middle' => array(
+      'identifier'  => 5,
+      'label'       => t('Middle name'),
+      'description' => t('Middle name(s) of subject'),
+      'type'        => 'http://www.w3.org/2001/XMLSchema#normalizedString',
+      'section'     => t('Name'),
+    ),
+    'http://axschema.org/namePerson/suffix' => array(
+      'identifier'  => 6,
+      'label'       => t('Name suffix'),
+      'description' => t('Suffix of subject\'s name'),
+      'type'        => 'http://www.w3.org/2001/XMLSchema#normalizedString',
+      'section'     => t('Name'),
+    ),
+    'http://axschema.org/namePerson/friendly' => array(
+      'identifier'  => 7,
+      'label'       => t('Alias'),
+      'description' => t('Subject\'s alias or "screen" name'),
+      'type'        => 'http://www.w3.org/2001/XMLSchema#normalizedString',
+      'sreg'        => 'openid.sreg.nickname',
+      'section'     => t('Name'),
+    ),
+    'http://axschema.org/company/name' => array(
+      'identifier'  => 8,
+      'label'       => t('Company'),
+      'description' => t('Company name (employer) '),
+      'type'        => 'http://www.w3.org/2001/XMLSchema#normalizedString',
+      'section'     => t('Work'),
+    ),
+    'http://axschema.org/company/title' => array(
+      'identifier'  => 9,
+      'label'       => t('Title'),
+      'description' => t('Employee title'),
+      'type'        => 'http://www.w3.org/2001/XMLSchema#normalizedString',
+      'section'     => t('Work'),
+    ),
+    'http://axschema.org/birthDate' => array(
+      'identifier'  => 10,
+      'label'       => t('Birth Date'),
+      'description' => t('Date of Birth'),
+      'type'        => 'http://www.w3.org/2001/XMLSchema#date',
+      'sreg'        => 'openid.sreg.dob',
+      'section'     => t('Date-Of-Birth'),
+    ),
+    'http://axschema.org/birthDate/birthYear' => array(
+      'identifier'  => 11,
+      'label'       => t('Birth year'),
+      'description' => t('Year of birth (four digits) '),
+      'type'        => 'http://www.w3.org/2001/XMLSchema#gYear',
+      'section'     => t('Date-Of-Birth'),
+    ),
+    'http://axschema.org/birthDate/birthMonth' => array(
+      'identifier'  => 12,
+      'label'       => t('Birth month'),
+      'description' => t('Month of birth (1-12)'),
+      'type'        => 'http://www.w3.org/2001/XMLSchema#gMonth',
+      'section'     => t('Date-Of-Birth'),
+    ),
+    'http://axschema.org/birthDate/birthday' => array(
+      'identifier'  => 13,
+      'label'       => t('Birth day'),
+      'description' => t('Day of birth'),
+      'type'        => 'http://www.w3.org/2001/XMLSchema#gDay',
+      'section'     => t('Date-Of-Birth'),
+    ),
+    'http://axschema.org/contact/phone/default' => array(
+      'identifier'  => 14,
+      'label'       => t('Phone (preferred) '),
+      'description' => t('Main phone number (preferred) '),
+      'type'        => 'http://www.w3.org/2001/XMLSchema#normalizedString',
+      'section'     => t('Telephone'),
+    ),
+    'http://axschema.org/contact/phone/home' => array(
+      'identifier'  => 15,
+      'label'       => t('Phone (home) '),
+      'description' => t('Home phone number'),
+      'type'        => 'http://www.w3.org/2001/XMLSchema#normalizedString',
+      'section'     => t('Telephone'),
+    ),
+    'http://axschema.org/contact/phone/business' => array(
+      'identifier'  => 16,
+      'label'       => t('Phone (work) '),
+      'description' => t('Business phone number '),
+      'type'        => 'http://www.w3.org/2001/XMLSchema#normalizedString',
+      'section'     => t('Telephone'),
+    ),
+    'http://axschema.org/contact/phone/cell' => array(
+      'identifier'  => 17,
+      'label'       => t('Phone (mobile) '),
+      'description' => t('Cellular (or mobile) phone number '),
+      'type'        => 'http://www.w3.org/2001/XMLSchema#normalizedString',
+      'section'     => t('Telephone'),
+    ),
+    'http://axschema.org/contact/phone/fax' => array(
+      'identifier'  => 18,
+      'label'       => t('Phone (fax) '),
+      'description' => t('Fax number'),
+      'type'        => 'http://www.w3.org/2001/XMLSchema#normalizedString',
+      'section'     => t('Telephone'),
+    ),
+    'http://axschema.org/contact/postalAddress/home' => array(
+      'identifier'  => 19,
+      'label'       => t('Address'),
+      'description' => t('Home postal address: street number, name and apartment number'),
+      'type'        => 'http://www.w3.org/2001/XMLSchema#normalizedString',
+      'section'     => t('Address'),
+    ),
+    'http://axschema.org/contact/postalAddressAdditional/home' => array(
+      'identifier'  => 20,
+      'label'       => t('Address 2'),
+      'description' => t('Home postal address: supplementary information'),
+      'type'        => 'http://www.w3.org/2001/XMLSchema#normalizedString',
+      'section'     => t('Address'),
+    ),
+    'http://axschema.org/contact/city/home' => array(
+      'identifier'  => 21,
+      'label'       => t('City'),
+      'description' => t('Home city name'),
+      'type'        => 'http://www.w3.org/2001/XMLSchema#normalizedString',
+      'section'     => t('Address'),
+    ),
+    'http://axschema.org/contact/state/home' => array(
+      'identifier'  => 22,
+      'label'       => t('State/Province'),
+      'description' => t('Home state or province name'),
+      'type'        => 'http://www.w3.org/2001/XMLSchema#normalizedString',
+      'section'     => t('Address'),
+    ),
+    'http://axschema.org/contact/country/home' => array(
+      'identifier'  => 23,
+      'label'       => t('Country'),
+      'description' => t('Home country code'),
+      'type'        => 'http://www.w3.org/2001/XMLSchema#normalizedString',
+      'section'     => t('Address'),
+    ),
+    'http://axschema.org/contact/postalCode/home' => array(
+      'identifier'  => 24,
+      'label'       => t('Postal code'),
+      'description' => t('Home postal code'),
+      'type'        => 'http://www.w3.org/2001/XMLSchema#normalizedString',
+      'section'     => t('Address'),
+    ),
+    'http://axschema.org/contact/postalAddress/business' => array(
+      'identifier'  => 25,
+      'label'       => t('Business Address'),
+      'description' => t('Business postal address: street number, name and apartment number'),
+      'type'        => 'http://www.w3.org/2001/XMLSchema#normalizedString',
+      'section'     => t('Business-Address'),
+    ),
+    'http://axschema.org/contact/postalAddressAdditional/business' => array(
+      'identifier'  => 26,
+      'label'       => t('Business Address 2 '),
+      'description' => t('Business postal address: supplementary information'),
+      'type'        => 'http://www.w3.org/2001/XMLSchema#normalizedString',
+      'section'     => t('Business-Address'),
+    ),
+    'http://axschema.org/contact/city/business' => array(
+      'identifier'  => 27,
+      'label'       => t('City'),
+      'description' => t('Business city name'),
+      'type'        => 'http://www.w3.org/2001/XMLSchema#normalizedString',
+      'section'     => t('Business-Address'),
+    ),
+    'http://axschema.org/contact/state/business' => array(
+      'identifier'  => 28,
+      'label'       => t('State/Province'),
+      'description' => t('Business state or province name '),
+      'type'        => 'http://www.w3.org/2001/XMLSchema#normalizedString',
+      'section'     => t('Business-Address'),
+    ),
+    'http://axschema.org/contact/country/business' => array(
+      'identifier'  => 29,
+      'label'       => t('Country'),
+      'description' => t('Business country code'),
+      'type'        => 'http://www.w3.org/2001/XMLSchema#normalizedString',
+      'section'     => t('Business-Address'),
+    ),
+    'http://axschema.org/contact/postalCode/business' => array(
+      'identifier'  => 30,
+      'label'       => t('Postal code'),
+      'description' => t('Business postal code'),
+      'type'        => 'http://www.w3.org/2001/XMLSchema#normalizedString',
+      'section'     => t('Business-Address'),
+    ),
+    'http://axschema.org/contact/email' => array(
+      'identifier'  => 31,
+      'label'       => t('Email'),
+      'description' => t('Internet SMTP email address as per RFC2822'),
+      'type'        => 'http://www.w3.org/2001/XMLSchema#normalizedString',
+      'sreg'        => 'openid.sreg.email',
+      'section'     => t('Email'),
+    ),
+    'http://axschema.org/contact/IM/AIM' => array(
+      'identifier'  => 32,
+      'label'       => t('AOL IM'),
+      'description' => t('AOL instant messaging service handle'),
+      'type'        => 'http://www.w3.org/2001/XMLSchema#normalizedString',
+      'section'     => t('Instant-Messaging'),
+    ),
+    'http://axschema.org/contact/IM/ICQ' => array(
+      'identifier'  => 33,
+      'label'       => t('ICQ IM'),
+      'description' => t('ICQ instant messaging service handle'),
+      'type'        => 'http://www.w3.org/2001/XMLSchema#normalizedString',
+      'section'     => t('Instant-Messaging'),
+    ),
+    'http://axschema.org/contact/IM/MSN' => array(
+      'identifier'  => 34,
+      'label'       => t('MSN IM'),
+      'description' => t('MSN instant messaging service handle'),
+      'type'        => 'http://www.w3.org/2001/XMLSchema#normalizedString',
+      'section'     => t('Instant-Messaging'),
+    ),
+    'http://axschema.org/contact/IM/Yahoo' => array(
+      'identifier'  => 35,
+      'label'       => t('Yahoo! IM'),
+      'description' => t('Yahoo! instant messaging service handle'),
+      'type'        => 'http://www.w3.org/2001/XMLSchema#normalizedString',
+      'section'     => t('Instant-Messaging'),
+    ),
+    'http://axschema.org/contact/IM/Jabber' => array(
+      'identifier'  => 36,
+      'label'       => t('Jabber IM'),
+      'description' => t('Jabber instant messaging service handle'),
+      'type'        => 'http://www.w3.org/2001/XMLSchema#normalizedString',
+      'section'     => t('Instant-Messaging'),
+    ),
+    'http://axschema.org/contact/IM/Skype' => array(
+      'identifier'  => 37,
+      'label'       => t('Skype IM '),
+      'description' => t('Skype instant messaging service handle'),
+      'type'        => 'http://www.w3.org/2001/XMLSchema#normalizedString',
+      'section'     => t('Instant-Messaging'),
+    ),
+    'http://axschema.org/contact/web/default' => array(
+      'identifier'  => 38,
+      'label'       => t('Web page'),
+      'description' => t('Web site URL'),
+      'type'        => 'http://www.w3.org/2001/XMLSchema#anyURI',
+      'section'     => t('Web-Sites'),
+    ),
+    'http://axschema.org/contact/web/blog' => array(
+      'identifier'  => 39,
+      'label'       => t('Blog'),
+      'description' => t('Blog URL'),
+      'type'        => 'http://www.w3.org/2001/XMLSchema#anyURI',
+      'section'     => t('Web-Sites'),
+    ),
+    'http://axschema.org/contact/web/Linkedin' => array(
+      'identifier'  => 40,
+      'label'       => t('LinkedIn URL'),
+      'description' => t('LinkedIn URL'),
+      'type'        => 'http://www.w3.org/2001/XMLSchema#anyURI',
+      'section'     => t('Web-Sites'),
+    ),
+    'http://axschema.org/contact/web/Amazon' => array(
+      'identifier'  => 41,
+      'label'       => t('Amazon URL'),
+      'description' => t('Amazon URL'),
+      'type'        => 'http://www.w3.org/2001/XMLSchema#anyURI',
+      'section'     => t('Web-Sites'),
+    ),
+    'http://axschema.org/contact/web/Flickr' => array(
+      'identifier'  => 42,
+      'label'       => t('Flickr URL'),
+      'description' => t('Flickr URL'),
+      'type'        => 'http://www.w3.org/2001/XMLSchema#anyURI',
+      'section'     => t('Web-Sites'),
+    ),
+    'http://axschema.org/contact/web/Delicious' => array(
+      'identifier'  => 43,
+      'label'       => t('del.icio.us URL'),
+      'description' => t('del.icio.us URL'),
+      'type'        => 'http://www.w3.org/2001/XMLSchema#anyURI',
+      'section'     => t('Web-Sites'),
+    ),
+    'http://axschema.org/media/spokenname' => array(
+      'identifier'  => 44,
+      'label'       => t('Spoken name'),
+      'description' => t('Spoken name (web URL) '),
+      'type'        => 'http://www.w3.org/2001/XMLSchema#anyURI',
+      'section'     => t('Audio/Video-Greetings'),
+    ),
+    'http://axschema.org/media/greeting/audio' => array(
+      'identifier'  => 45,
+      'label'       => t('Audio greeting'),
+      'description' => t('Audio greeting (web URL) '),
+      'type'        => 'http://www.w3.org/2001/XMLSchema#anyURI',
+      'section'     => t('Audio/Video-Greetings'),
+    ),
+    'http://axschema.org/media/greeting/video' => array(
+      'identifier'  => 46,
+      'label'       => t('Video greeting'),
+      'description' => t('Video greeting (web URL) '),
+      'type'        => 'http://www.w3.org/2001/XMLSchema#anyURI',
+      'section'     => t('Audio/Video-Greetings'),
+    ),
+    'http://axschema.org/media/image/default' => array(
+      'identifier'  => 47,
+      'label'       => t('Image'),
+      'description' => t('Image (web URL); unspecified dimension'),
+      'type'        => 'http://www.w3.org/2001/XMLSchema#anyURI',
+      'section'     => t('Images'),
+    ),
+    'http://axschema.org/media/image/aspect11' => array(
+      'identifier'  => 48,
+      'label'       => t('Square image'),
+      'description' => t('Image (web URL) with equal width and height'),
+      'type'        => 'http://www.w3.org/2001/XMLSchema#anyURI',
+      'section'     => t('Images'),
+    ),
+    'http://axschema.org/media/image/aspect43' => array(
+      'identifier'  => 49,
+      'label'       => t('4:3 aspect image'),
+      'description' => t('Image (web URL) 4:3 aspect ratio - landscape'),
+      'type'        => 'http://www.w3.org/2001/XMLSchema#anyURI',
+      'section'     => t('Images'),
+    ),
+    'http://axschema.org/media/image/aspect34' => array(
+      'identifier'  => 50,
+      'label'       => t('3:4 aspect image'),
+      'description' => t('Image (web URL) 3:4 aspect ratio - portrait'),
+      'type'        => 'http://www.w3.org/2001/XMLSchema#anyURI',
+      'section'     => t('Images'),
+    ),
+    'http://axschema.org/media/image/favicon' => array(
+      'identifier'  => 51,
+      'label'       => t('Favicon image'),
+      'description' => t('Image (web URL); favicon format'),
+      'type'        => 'http://www.w3.org/2001/XMLSchema#anyURI',
+      'section'     => t('Images'),
+    ),
+    'http://axschema.org/person/gender' => array(
+      'identifier'  => 52,
+      'label'       => t('Gender'),
+      'description' => t('Gender, either "M" or "F"'),
+      'type'        => 'http://www.w3.org/2001/XMLSchema#normalizedString',
+      'section'     => t('Extra-Information'),
+    ),
+    'http://axschema.org/pref/language' => array(
+      'identifier'  => 53,
+      'label'       => t('Language'),
+      'description' => t('Preferred language'),
+      'type'        => 'http://www.w3.org/2001/XMLSchema#normalizedString',
+      'section'     => t('Extra-Information'),
+    ),
+    'http://axschema.org/pref/timezone' => array(
+      'identifier'  => 54,
+      'label'       => t('Time zone'),
+      'description' => t('Home time zone information'),
+      'type'        => 'http://www.w3.org/2001/XMLSchema#normalizedString',
+      'section'     => t('Extra-Information'),
+    ),
+    'http://axschema.org/media/biography' => array(
+      'identifier'  => 55,
+      'label'       => t('Biography'),
+      'description' => t('Biography (text) '),
+      'type'        => 'http://www.w3.org/2001/XMLSchema#string',
+      'section'     => t('Extra-Information'),
+    ),
+  );
+  return $attributes;
+}
