Index: openid_client_ax.info
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/openid_client_ax/openid_client_ax.info,v
retrieving revision 1.2.2.2
diff -u -p -r1.2.2.2 openid_client_ax.info
--- openid_client_ax.info	31 Mar 2009 01:40:09 -0000	1.2.2.2
+++ openid_client_ax.info	20 Apr 2009 10:32:04 -0000
@@ -4,4 +4,6 @@ description = Provides the ability to do
 version = "6.x"
 core = 6.x
 dependencies[] = openid
+dependencies[] = openid_cp_field
 package = "OpenID"
+
Index: openid_client_ax.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/openid_client_ax/openid_client_ax.module,v
retrieving revision 1.2.2.2
diff -u -p -r1.2.2.2 openid_client_ax.module
--- openid_client_ax.module	31 Mar 2009 01:40:09 -0000	1.2.2.2
+++ openid_client_ax.module	20 Apr 2009 10:32:05 -0000
@@ -5,12 +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', ''));
-define('OPENID_CLIENT_AX_SUPRESS_NOTIFICATIONS', variable_get('openid_client_ax_supress_notifications', false));
 
 /**
  * Implementation of hook_perm().
@@ -46,29 +40,18 @@ 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 (!empty($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 (!empty($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);
+    $short_names = array();
+    foreach ($mapping as $openid => $node) {
+      $parts = explode('/', $openid);
+      $short_names[] = $parts[count($parts - 1)];
+      $request[sprintf('openid.%s.type.'. $parts[count($parts - 1)], variable_get('openid_client_ax_alias', 'ax'))] = $openid;
     }
+    $request[sprintf('openid.%s.if_available', variable_get('openid_client_ax_alias', 'ax'))] = implode(",", $short_names);
   }
   return $request;
 }
@@ -81,38 +64,30 @@ 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)'),
-  );
   if (module_exists('content_profile')) {
     $form['openid_client_ax']['openid_client_ax_supress_notifications'] = array(
       '#type'          => 'checkbox',
       '#title'         => t('Supress Content Profile Notifications'),
-      '#default_value' => OPENID_CLIENT_AX_SUPRESS_NOTIFICATIONS,
+      '#default_value' => variable_get('openid_client_ax_supress_notifications', FALSE),
       '#description'   => t('If checked we will supress notifications when a user logs in via Open ID and Client Attribute exchange if the content profile is updated'),
     );
   }
   return system_settings_form($form);
-
 }
 
 /**
@@ -208,7 +183,7 @@ function openid_client_ax_authentication
  *      User object of the user being updated
  */
 function openid_client_ax_openid_response($response = array(), $account) {
-  if (OPENID_CLIENT_AX_ENABLED) {
+  if (variable_get('openid_client_ax_enabled', FALSE)) {
     $user_update = array();
     if (module_exists('content_profile')) {
       $types = content_profile_get_types('names');
@@ -223,60 +198,25 @@ function openid_client_ax_openid_respons
       }
     }
     // Go through all of the returned attributes and save them for the user
-    $fields = explode("\n", OPENID_CLIENT_AX_FIELDS);
-    if (is_array($fields)) {
-      foreach ($fields as $field) {
-        $row = explode("|", $field);
-        $field_name = $row[0];
-        if (isset($account->{$field_name})) {
-          if (isset($response[str_replace('type', 'count', $row[1])])) {
-            $count = $response[str_replace('type', 'count', $row[1])];
-            if (is_numeric($count) && $count) {
-              // Check the number of responses we received back if it was a multiple row
-              $returndata = _openid_client_ax_get_multiple_values($response, $row[1], $count);
-              // If no information was available do not set this attribute
-              if (drupal_strlen($returndata)) {
-                $user_update[$field_name] = $returndata;
-              }
-            }
-          }
-          else {
-            if (isset($response[str_replace('type', 'value', $row[1])])) {
-              $user_update[$field_name] = $response[sprintf(str_replace('type', 'value', $row[1]), OPENID_CLIENT_AX_ALIAS)];
-            }
-          }
+    $mapping = array();
+    openid_cp_field_get_mapping($mapping);
+    foreach ($mapping as $openid => $node) {
+      $field_value = $response[str_replace('type', 'value', $openid)];
+      if (!empty($field_value)) {
+        $profile->$node = array();
+        // Check if it's a CCK field or not
+        if (strstr($node, 'field_') && module_exists('content_profile')) {
+          $profile->{$node}[0]['value'] = $field_value;
         }
-        elseif(module_exists('content_profile')) {
-          if (isset($response[str_replace('type', 'count', $row[1])])) {
-            $count = $response[str_replace('type', 'count', $row[1])];
-            if (is_numeric($count) && $count) {
-              // Check the number of responses we received back if it was a multiple row
-              $returndata = _openid_client_ax_get_multiple_values($response, $row[1], $count);
-              // If no information was available do not set this attribute
-              if (drupal_strlen($returndata)) {
-                if (isset($profile->{$field_name})) {
-                  $profile->{$field_name}[0]['value'] = $returndata;
-                }
-                else {
-                  $profile->{$field_name} = array(0 => array('value' => $returndata));
-                }
-              }
-            }
-          }
-          else {
-            // replacing the type for value so we can retrieve the value from the system
-            if (isset($response[sprintf(str_replace('type', 'value', $row[1]), OPENID_CLIENT_AX_ALIAS)])) {
-              if (isset($profile->{$field_name})) {
-                $profile->{$field_name}[0]['value'] = $response[sprintf(str_replace('type', 'value', $row[1]), OPENID_CLIENT_AX_ALIAS)];
-              }
-              else {
-                $profile->{$field_name} = array(0 => array('value' => $response[sprintf(str_replace('type', 'value', $row[1]), OPENID_CLIENT_AX_ALIAS)]));
-              }
-            }
-          }
+        else {
+          $profile->{$node} = $field_value;
         }
       }
     }
+    if (!isset($profile->title)) {
+      $profile->title = $account->name;
+    }
+    
     // saving the user account with any pertinent information inside it
     if (!empty($user_update)) {
       user_save($account, $user_update);
@@ -285,7 +225,7 @@ function openid_client_ax_openid_respons
     if (module_exists('content_profile')) {
       $profile = node_submit($profile);
       // Supressing the notifications for Content Profile Nodes if the administrator has specified
-      if (OPENID_CLIENT_AX_SUPRESS_NOTIFICATIONS) {
+      if (variable_get('openid_client_ax_supress_notifications', FALSE)) {
         $profile->notifications_content_disable = 1;
       }
       // Since we utilize autonodetitle for the titles have added this to update the node title
@@ -319,3 +259,411 @@ function _openid_client_ax_get_multiple_
   return $return;
 }
 
+/**
+ * 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;
+}
