402877, r=sayre, a=schrep - rename an internal structure in microformats. types->values
authormkaply@us.ibm.com
Wed, 16 Jan 2008 11:51:22 -0800
changeset 10338 23c68d7e30e0f27cab0fc5747cf8b54be61cedfc
parent 10337 72c938c4c35565b2bd7d1d94579beba48a6dbc93
child 10339 664c45c1ae2c893b6f61fc1a3736258e84494398
push idunknown
push userunknown
push dateunknown
reviewerssayre, schrep
bugs402877
milestone1.9b3pre
402877, r=sayre, a=schrep - rename an internal structure in microformats. types->values
toolkit/components/microformats/src/Microformats.js
--- a/toolkit/components/microformats/src/Microformats.js
+++ b/toolkit/components/microformats/src/Microformats.js
@@ -503,20 +503,20 @@ var Microformats = {
           result = Microformats.parser.textGetter(node, parentnode);
           if ((prop.implied) && (result)) {
             var temp = result;
             result = {};
             result[prop.implied] = temp;
           }
           break;
       }
-      if (result && prop.types) {
+      if (result && prop.values) {
         var validType = false;
-        for (let type in prop.types) {
-          if (result.toLowerCase() == prop.types[type]) {
+        for (let value in prop.values) {
+          if (result.toLowerCase() == prop.values[value]) {
             validType = true;
             break;
           }
         }
         if (!validType) {
           return;
         }
       }
@@ -991,17 +991,17 @@ adr.prototype.toString = function() {
 
 var adr_definition = {
   mfVersion: 0.8,
   mfObject: adr,
   className: "adr",
   properties: {
     "type" : {
       plural: true,
-      types: ["work", "home", "pref", "postal", "dom", "intl", "parcel"]
+      values: ["work", "home", "pref", "postal", "dom", "intl", "parcel"]
     },
     "post-office-box" : {
     },
     "street-address" : {
       plural: true
     },
     "extended-address" : {
     },
@@ -1064,30 +1064,29 @@ var hCard_definition = {
       datatype: "microformat",
       microformat: "tag",
       microformat_property: "tag"
     },
     "email" : {
       subproperties: {
         "type" : {
           plural: true,
-          types: ["internet", "x400", "pref"]
+          values: ["internet", "x400", "pref"]
         },
         "value" : {
           datatype: "email",
           virtual: true
         }
       },
       plural: true   
     },
     "fn" : {
       required: true
     },
     "geo" : {
-      value: "geo",
       datatype: "microformat",
       microformat: "geo"
     },
     "key" : {
       plural: true
     },
     "label" : {
       plural: true
@@ -1197,17 +1196,17 @@ var hCard_definition = {
     },
     "title" : {
       plural: true
     },
     "tel" : {
       subproperties: {
         "type" : {
           plural: true,
-          types: ["msg", "home", "work", "pref", "voice", "fax", "cell", "video", "pager", "bbs", "car", "isdn", "pcs"]
+          values: ["msg", "home", "work", "pref", "voice", "fax", "cell", "video", "pager", "bbs", "car", "isdn", "pcs"]
         },
         "value" : {
           datatype: "tel"
         }
       },
       plural: true,
       implied: "value"
     },
@@ -1258,47 +1257,46 @@ var hCalendar_definition = {
   properties: {
     "category" : {
       plural: true,
       datatype: "microformat",
       microformat: "tag",
       microformat_property: "tag"
     },
     "class" : {
-      types: ["public", "private", "confidential"]
+      values: ["public", "private", "confidential"]
     },
     "description" : {
       datatype: "HTML"
     },
     "dtstart" : {
       datatype: "dateTime"
     },
     "dtend" : {
       datatype: "dateTime"
     },
     "dtstamp" : {
       datatype: "dateTime"
     },
     "duration" : {
     },
     "geo" : {
-      value: "geo",
       datatype: "microformat",
       microformat: "geo"
     },
     "location" : {
       datatype: "microformat",
       microformat: "hCard"
     },
     "status" : {
-      types: ["tentative", "confirmed", "cancelled"]
+      values: ["tentative", "confirmed", "cancelled"]
     },
     "summary" : {},
     "transp" : {
-      types: ["opaque", "transparent"]
+      values: ["opaque", "transparent"]
     },
     "uid" : {
       datatype: "anyURI"
     },
     "url" : {
       datatype: "anyURI"
     },
     "last-modified" : {