Index: openid_provider_ax.info
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/openid_provider_ax/openid_provider_ax.info,v
retrieving revision 1.1
diff -u -p -r1.1 openid_provider_ax.info
--- openid_provider_ax.info	14 Oct 2008 19:25:04 -0000	1.1
+++ openid_provider_ax.info	16 Mar 2009 12:15:46 -0000
@@ -3,5 +3,4 @@ name = OpenID Provider Attribute Exchang
 description = Provides the ability for Druapl too
 core = 6.x
 dependencies[] = openid_provider
-dependencies[] = openid_provider_persona
 package = "OpenID Provider"
Index: openid_provider_ax.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/openid_provider_ax/openid_provider_ax.module,v
retrieving revision 1.3
diff -u -p -r1.3 openid_provider_ax.module
--- openid_provider_ax.module	10 Mar 2009 15:53:06 -0000	1.3
+++ openid_provider_ax.module	16 Mar 2009 12:15:47 -0000
@@ -55,7 +55,7 @@ function openid_provider_ax_response_pro
     $attributes = openid_provider_ax_parse_request($request, $alias);
     switch ($request_type) {
       case 'fetch_request':
-        $processed = openid_provider_persona_process_ax($attributes, $request, $alias);
+        $processed = array_merge($processed, module_invoke_all('openid_provider_ax', 'load', $attributes, $request));
         $processed = array_merge($processed, array($alias_key => OPENID_PROVIDER_AX, sprintf('openid%smode', $alias) => 'fetch_response'));
         break;
       case 'store_request':
@@ -125,3 +125,412 @@ function openid_provider_ax_parse_reques
 
   return $attributes;
 }
+
+/**
+ * Create an array containing the identifiers as listed in
+ * http://www.axschema.org/types/
+ *
+ * @return
+ *   Array containing the schema definitions
+ */
+function openid_provider_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'       => 'Full Name',
+      'description' => 'Full name of subject',
+      'type'        => 'http://www.w3.org/2001/XMLSchema#normalizedString',
+      'sreg'        => 'openid.sreg.fullname',
+      'section'     => 'Name',
+    ),
+    'http://axschema.org/namePerson/prefix' => array(
+      'identifier'  => 2,
+      'label'       => 'Name prefix',
+      'description' => 'Honorific prefix for the subject\'s name; i.e. "Mr.", "Mrs.", "Dr."',
+      'type'        => 'http://www.w3.org/2001/XMLSchema#normalizedString',
+      'section'     => 'Name',
+    ),
+    'http://axschema.org/namePerson/first' => array(
+      'identifier'  => 3,
+      'label'       => 'First name',
+      'description' => 'First or given name of subject',
+      'type'        => 'http://www.w3.org/2001/XMLSchema#normalizedString',
+      'section'     => 'Name',
+    ),
+    'http://axschema.org/namePerson/last' => array(
+      'identifier'  => 4,
+      'label'       => 'Last name',
+      'description' => 'Last name or surname of subject',
+      'type'        => 'http://www.w3.org/2001/XMLSchema#normalizedString',
+      'section'     => 'Name',
+    ),
+    'http://axschema.org/namePerson/middle' => array(
+      'identifier'  => 5,
+      'label'       => 'Middle name',
+      'description' => 'Middle name(s) of subject',
+      'type'        => 'http://www.w3.org/2001/XMLSchema#normalizedString',
+      'section'     => 'Name',
+    ),
+    'http://axschema.org/namePerson/suffix' => array(
+      'identifier'  => 6,
+      'label'       => 'Name suffix',
+      'description' => 'Suffix of subject\'s name',
+      'type'        => 'http://www.w3.org/2001/XMLSchema#normalizedString',
+      'section'     => 'Name',
+    ),
+    'http://axschema.org/namePerson/friendly' => array(
+      'identifier'  => 7,
+      'label'       => 'Alias',
+      'description' => 'Subject\'s alias or "screen" name',
+      'type'        => 'http://www.w3.org/2001/XMLSchema#normalizedString',
+      'sreg'        => 'openid.sreg.nickname',
+      'section'     => 'Name',
+    ),
+    'http://axschema.org/company/name' => array(
+      'identifier'  => 8,
+      'label'       => 'Company',
+      'description' => 'Company name (employer) ',
+      'type'        => 'http://www.w3.org/2001/XMLSchema#normalizedString',
+      'section'     => 'Work',
+    ),
+    'http://axschema.org/company/title' => array(
+      'identifier'  => 9,
+      'label'       => 'Title',
+      'description' => 'Employee title',
+      'type'        => 'http://www.w3.org/2001/XMLSchema#normalizedString',
+      'section'     => 'Work',
+    ),
+    'http://axschema.org/birthDate' => array(
+      'identifier'  => 10,
+      'label'       => 'Birth Date',
+      'description' => 'Date of Birth',
+      'type'        => 'http://www.w3.org/2001/XMLSchema#date',
+      'sreg'        => 'openid.sreg.dob',
+      'section'     => 'Date-Of-Birth',
+    ),
+    'http://axschema.org/birthDate/birthYear' => array(
+      'identifier'  => 11,
+      'label'       => 'Birth year',
+      'description' => 'Year of birth (four digits) ',
+      'type'        => 'http://www.w3.org/2001/XMLSchema#gYear',
+      'section'     => 'Date-Of-Birth',
+    ),
+    'http://axschema.org/birthDate/birthMonth' => array(
+      'identifier'  => 12,
+      'label'       => 'Birth month',
+      'description' => 'Month of birth (1-12)',
+      'type'        => 'http://www.w3.org/2001/XMLSchema#gMonth',
+      'section'     => 'Date-Of-Birth',
+    ),
+    'http://axschema.org/birthDate/birthday' => array(
+      'identifier'  => 13,
+      'label'       => 'Birth day',
+      'description' => 'Day of birth',
+      'type'        => 'http://www.w3.org/2001/XMLSchema#gDay',
+      'section'     => 'Date-Of-Birth',
+    ),
+    'http://axschema.org/contact/phone/default' => array(
+      'identifier'  => 14,
+      'label'       => 'Phone (preferred) ',
+      'description' => 'Main phone number (preferred) ',
+      'type'        => 'http://www.w3.org/2001/XMLSchema#normalizedString',
+      'section'     => 'Telephone',
+    ),
+    'http://axschema.org/contact/phone/home' => array(
+      'identifier'  => 15,
+      'label'       => 'Phone (home) ',
+      'description' => 'Home phone number',
+      'type'        => 'http://www.w3.org/2001/XMLSchema#normalizedString',
+      'section'     => 'Telephone',
+    ),
+    'http://axschema.org/contact/phone/business' => array(
+      'identifier'  => 16,
+      'label'       => 'Phone (work) ',
+      'description' => 'Business phone number ',
+      'type'        => 'http://www.w3.org/2001/XMLSchema#normalizedString',
+      'section'     => 'Telephone',
+    ),
+    'http://axschema.org/contact/phone/cell' => array(
+      'identifier'  => 17,
+      'label'       => 'Phone (mobile) ',
+      'description' => 'Cellular (or mobile) phone number ',
+      'type'        => 'http://www.w3.org/2001/XMLSchema#normalizedString',
+      'section'     => 'Telephone',
+    ),
+    'http://axschema.org/contact/phone/fax' => array(
+      'identifier'  => 18,
+      'label'       => 'Phone (fax) ',
+      'description' => 'Fax number',
+      'type'        => 'http://www.w3.org/2001/XMLSchema#normalizedString',
+      'section'     => 'Telephone',
+    ),
+    'http://axschema.org/contact/postalAddress/home' => array(
+      'identifier'  => 19,
+      'label'       => 'Address',
+      'description' => 'Home postal address: street number, name and apartment number',
+      'type'        => 'http://www.w3.org/2001/XMLSchema#normalizedString',
+      'section'     => 'Address',
+    ),
+    'http://axschema.org/contact/postalAddressAdditional/home' => array(
+      'identifier'  => 20,
+      'label'       => 'Address 2',
+      'description' => 'Home postal address: supplementary information',
+      'type'        => 'http://www.w3.org/2001/XMLSchema#normalizedString',
+      'section'     => 'Address',
+    ),
+    'http://axschema.org/contact/city/home' => array(
+      'identifier'  => 21,
+      'label'       => 'City',
+      'description' => 'Home city name',
+      'type'        => 'http://www.w3.org/2001/XMLSchema#normalizedString',
+      'section'     => 'Address',
+    ),
+    'http://axschema.org/contact/state/home' => array(
+      'identifier'  => 22,
+      'label'       => 'State/Province',
+      'description' => 'Home state or province name',
+      'type'        => 'http://www.w3.org/2001/XMLSchema#normalizedString',
+      'section'     => 'Address',
+    ),
+    'http://axschema.org/contact/country/home' => array(
+      'identifier'  => 23,
+      'label'       => 'Country',
+      'description' => 'Home country code',
+      'type'        => 'http://www.w3.org/2001/XMLSchema#normalizedString',
+      'section'     => 'Address',
+    ),
+    'http://axschema.org/contact/postalCode/home' => array(
+      'identifier'  => 24,
+      'label'       => 'Postal code',
+      'description' => 'Home postal code',
+      'type'        => 'http://www.w3.org/2001/XMLSchema#normalizedString',
+      'section'     => 'Address',
+    ),
+    'http://axschema.org/contact/postalAddress/business' => array(
+      'identifier'  => 25,
+      'label'       => 'Business Address',
+      'description' => 'Business postal address: street number, name and apartment number',
+      'type'        => 'http://www.w3.org/2001/XMLSchema#normalizedString',
+      'section'     => 'Business-Address',
+    ),
+    'http://axschema.org/contact/postalAddressAdditional/business' => array(
+      'identifier'  => 26,
+      'label'       => 'Business Address 2 ',
+      'description' => 'Business postal address: supplementary information',
+      'type'        => 'http://www.w3.org/2001/XMLSchema#normalizedString',
+      'section'     => 'Business-Address',
+    ),
+    'http://axschema.org/contact/city/business' => array(
+      'identifier'  => 27,
+      'label'       => 'City',
+      'description' => 'Business city name',
+      'type'        => 'http://www.w3.org/2001/XMLSchema#normalizedString',
+      'section'     => 'Business-Address',
+    ),
+    'http://axschema.org/contact/state/business' => array(
+      'identifier'  => 28,
+      'label'       => 'State/Province',
+      'description' => 'Business state or province name ',
+      'type'        => 'http://www.w3.org/2001/XMLSchema#normalizedString',
+      'section'     => 'Business-Address',
+    ),
+    'http://axschema.org/contact/country/business' => array(
+      'identifier'  => 29,
+      'label'       => 'Country',
+      'description' => 'Business country code',
+      'type'        => 'http://www.w3.org/2001/XMLSchema#normalizedString',
+      'section'     => 'Business-Address',
+    ),
+    'http://axschema.org/contact/postalCode/business' => array(
+      'identifier'  => 30,
+      'label'       => 'Postal code',
+      'description' => 'Business postal code',
+      'type'        => 'http://www.w3.org/2001/XMLSchema#normalizedString',
+      'section'     => 'Business-Address',
+    ),
+    'http://axschema.org/contact/email' => array(
+      'identifier'  => 31,
+      'label'       => 'Email',
+      'description' => 'Internet SMTP email address as per RFC2822',
+      'type'        => 'http://www.w3.org/2001/XMLSchema#normalizedString',
+      'sreg'        => 'openid.sreg.email',
+      'section'     => 'Email',
+    ),
+    'http://axschema.org/contact/IM/AIM' => array(
+      'identifier'  => 32,
+      'label'       => 'AOL IM',
+      'description' => 'AOL instant messaging service handle',
+      'type'        => 'http://www.w3.org/2001/XMLSchema#normalizedString',
+      'section'     => 'Instant-Messaging',
+    ),
+    'http://axschema.org/contact/IM/ICQ' => array(
+      'identifier'  => 33,
+      'label'       => 'ICQ IM',
+      'description' => 'ICQ instant messaging service handle',
+      'type'        => 'http://www.w3.org/2001/XMLSchema#normalizedString',
+      'section'     => 'Instant-Messaging',
+    ),
+    'http://axschema.org/contact/IM/MSN' => array(
+      'identifier'  => 34,
+      'label'       => 'MSN IM',
+      'description' => 'MSN instant messaging service handle',
+      'type'        => 'http://www.w3.org/2001/XMLSchema#normalizedString',
+      'section'     => 'Instant-Messaging',
+    ),
+    'http://axschema.org/contact/IM/Yahoo' => array(
+      'identifier'  => 35,
+      'label'       => 'Yahoo! IM',
+      'description' => 'Yahoo! instant messaging service handle',
+      'type'        => 'http://www.w3.org/2001/XMLSchema#normalizedString',
+      'section'     => 'Instant-Messaging',
+    ),
+    'http://axschema.org/contact/IM/Jabber' => array(
+      'identifier'  => 36,
+      'label'       => 'Jabber IM',
+      'description' => 'Jabber instant messaging service handle',
+      'type'        => 'http://www.w3.org/2001/XMLSchema#normalizedString',
+      'section'     => 'Instant-Messaging',
+    ),
+    'http://axschema.org/contact/IM/Skype' => array(
+      'identifier'  => 37,
+      'label'       => 'Skype IM ',
+      'description' => 'Skype instant messaging service handle',
+      'type'        => 'http://www.w3.org/2001/XMLSchema#normalizedString',
+      'section'     => 'Instant-Messaging',
+    ),
+    'http://axschema.org/contact/web/default' => array(
+      'identifier'  => 38,
+      'label'       => 'Web page',
+      'description' => 'Web site URL',
+      'type'        => 'http://www.w3.org/2001/XMLSchema#anyURI',
+      'section'     => 'Web-Sites',
+    ),
+    'http://axschema.org/contact/web/blog' => array(
+      'identifier'  => 39,
+      'label'       => 'Blog',
+      'description' => 'Blog URL',
+      'type'        => 'http://www.w3.org/2001/XMLSchema#anyURI',
+      'section'     => 'Web-Sites',
+    ),
+    'http://axschema.org/contact/web/Linkedin' => array(
+      'identifier'  => 40,
+      'label'       => 'LinkedIn URL',
+      'description' => 'LinkedIn URL',
+      'type'        => 'http://www.w3.org/2001/XMLSchema#anyURI',
+      'section'     => 'Web-Sites',
+    ),
+    'http://axschema.org/contact/web/Amazon' => array(
+      'identifier'  => 41,
+      'label'       => 'Amazon URL',
+      'description' => 'Amazon URL',
+      'type'        => 'http://www.w3.org/2001/XMLSchema#anyURI',
+      'section'     => 'Web-Sites',
+    ),
+    'http://axschema.org/contact/web/Flickr' => array(
+      'identifier'  => 42,
+      'label'       => 'Flickr URL',
+      'description' => 'Flickr URL',
+      'type'        => 'http://www.w3.org/2001/XMLSchema#anyURI',
+      'section'     => 'Web-Sites',
+    ),
+    'http://axschema.org/contact/web/Delicious' => array(
+      'identifier'  => 43,
+      'label'       => 'del.icio.us URL',
+      'description' => 'del.icio.us URL',
+      'type'        => 'http://www.w3.org/2001/XMLSchema#anyURI',
+      'section'     => 'Web-Sites',
+    ),
+    'http://axschema.org/media/spokenname' => array(
+      'identifier'  => 44,
+      'label'       => 'Spoken name',
+      'description' => 'Spoken name (web URL) ',
+      'type'        => 'http://www.w3.org/2001/XMLSchema#anyURI',
+      'section'     => 'Audio/Video-Greetings',
+    ),
+    'http://axschema.org/media/greeting/audio' => array(
+      'identifier'  => 45,
+      'label'       => 'Audio greeting',
+      'description' => 'Audio greeting (web URL) ',
+      'type'        => 'http://www.w3.org/2001/XMLSchema#anyURI',
+      'section'     => 'Audio/Video-Greetings',
+    ),
+    'http://axschema.org/media/greeting/video' => array(
+      'identifier'  => 46,
+      'label'       => 'Video greeting',
+      'description' => 'Video greeting (web URL) ',
+      'type'        => 'http://www.w3.org/2001/XMLSchema#anyURI',
+      'section'     => 'Audio/Video-Greetings',
+    ),
+    'http://axschema.org/media/image/default' => array(
+      'identifier'  => 47,
+      'label'       => 'Image',
+      'description' => 'Image (web URL); unspecified dimension',
+      'type'        => 'http://www.w3.org/2001/XMLSchema#anyURI',
+      'section'     => 'Images',
+    ),
+    'http://axschema.org/media/image/aspect11' => array(
+      'identifier'  => 48,
+      'label'       => 'Square image',
+      'description' => 'Image (web URL) with equal width and height',
+      'type'        => 'http://www.w3.org/2001/XMLSchema#anyURI',
+      'section'     => 'Images',
+    ),
+    'http://axschema.org/media/image/aspect43' => array(
+      'identifier'  => 49,
+      'label'       => '4:3 aspect image',
+      'description' => 'Image (web URL) 4:3 aspect ratio - landscape',
+      'type'        => 'http://www.w3.org/2001/XMLSchema#anyURI',
+      'section'     => 'Images',
+    ),
+    'http://axschema.org/media/image/aspect34' => array(
+      'identifier'  => 50,
+      'label'       => '3:4 aspect image',
+      'description' => 'Image (web URL) 3:4 aspect ratio - portrait',
+      'type'        => 'http://www.w3.org/2001/XMLSchema#anyURI',
+      'section'     => 'Images',
+    ),
+    'http://axschema.org/media/image/favicon' => array(
+      'identifier'  => 51,
+      'label'       => 'Favicon image',
+      'description' => 'Image (web URL); favicon format',
+      'type'        => 'http://www.w3.org/2001/XMLSchema#anyURI',
+      'section'     => 'Images',
+    ),
+    'http://axschema.org/person/gender' => array(
+      'identifier'  => 52,
+      'label'       => 'Gender',
+      'description' => 'Gender, either "M" or "F"',
+      'type'        => 'http://www.w3.org/2001/XMLSchema#normalizedString',
+      'section'     => 'Extra-Information',
+    ),
+    'http://axschema.org/pref/language' => array(
+      'identifier'  => 53,
+      'label'       => 'Language',
+      'description' => 'Preferred language',
+      'type'        => 'http://www.w3.org/2001/XMLSchema#normalizedString',
+      'section'     => 'Extra-Information',
+    ),
+    'http://axschema.org/pref/timezone' => array(
+      'identifier'  => 54,
+      'label'       => 'Time zone',
+      'description' => 'Home time zone information',
+      'type'        => 'http://www.w3.org/2001/XMLSchema#normalizedString',
+      'section'     => 'Extra-Information',
+    ),
+    'http://axschema.org/media/biography' => array(
+      'identifier'  => 55,
+      'label'       => 'Biography',
+      'description' => 'Biography (text) ',
+      'type'        => 'http://www.w3.org/2001/XMLSchema#string',
+      'section'     => 'Extra-Information',
+    ),
+  );
+  return $attributes;
+}
