Dan Brickley schrieb:
+1 ...keeping the naming the same (minus punctuation fixes for .js syntax) makes sense.

Ok. New Diagram and Zip are online now.

To sum it up:

1. A jCard has the same properties as any hCard/vCard.

2. Hyphenated properties from hCard/vCard drop the hyphen and use camel-case instead.
Correct: given-name becomes givenName.

So much for naming conventions. On to structure.

3. All singular instance properties use only their correspong datatype for value.

Correct:
n = { givenName: 'John', familyName: 'Doe'}
fn = 'John Doe'

Wrong:
n = [ {givenName: 'John'}, {familyName: 'Doe'} ]
fn = {value: 'John Doe'}

4. All properties that may have multiple instances use an Array of their corresponding datatype.
Correct: nickname = ['Rio Demonhog', 'Gogo Fiasco']

5. Properties that are not set must be omitted.
Example: email = [
   {type: ['pref'], value: '[EMAIL PROTECTED]'},
   {value: '[EMAIL PROTECTED]'}
]

I am undecided on disallowing or forcing reduction of Arrays and Objects, when they only hold a single value. There is definitely an advantage in disallowing reduction, as it reduces authoring choices and thus complexity. So if we want to keep it simple, I guess disallowing is the right choice. On the other hand, JavaScript is loosely typed and we could come up with a much more compact jCard if we force reduction. This would also make sense in conjunction with 5. The only thing that doesn't make sense to me is allowing both.

Would you want either

6a. Enclosing Arrays or Objects must NOT be reduced.
Wrong: email = '[EMAIL PROTECTED]'
Correct: email = [{value: '[EMAIL PROTECTED]'}]

or

6b. Enclosing Arrays or Objects MUST be reduced
Wrong: email = [{value: '[EMAIL PROTECTED]'}]
Correct: email = '[EMAIL PROTECTED]'

and

Correct: email = [
   {type: ['pref'], value: '[EMAIL PROTECTED]'},
   '[EMAIL PROTECTED]'
]

and

Wrong: nickname = ['Gogo Fiasco']
Correct: nickname = 'Gogo Fiasco'

and last rule

7. A type property must not be the only property of an Object.
Wrong: email = [{type: 'pref'}]

This would be it. So, what do you say?
Cheers, Gordon
_______________________________________________
microformats-discuss mailing list
microformats-discuss@microformats.org
http://microformats.org/mailman/listinfo/microformats-discuss

Reply via email to