[uf-dev] hCard test 21: multiple 'value' values

Tantek Ç elik tantek at cs.stanford.edu
Wed Jun 21 07:27:56 PDT 2006


On 6/21/06 3:47 AM, "Drew McLellan" <lists at allinthehead.com> wrote:

> I'm trying to figure out how best to get hKit to deal with hCard test
> 21.
> http://microformats.org/tests/hcard/21-tel.html
> 
> Specifically, the final phone number is broken up into multiple
> values. hKit is currently treating them as multiple values, but the
> test vCard concats them into one. Current hKit behaviour:
> 
> Array (
>    [type] => Array
>        (
>            [0] => msg
>            [1] => home
>            [2] => work
>            [3] => pref
>            [4] => voice
>            [5] => fax
>            [6] => cell
>            [7] => video
>            [8] => pager
>            [9] => bbs
>            [10] => car
>            [11] => isdn
>            [12] => pcs
>        )
> 
>    [value] => Array
>        (
>            [0] => +1
>            [1] => 415
>            [2] => 555
>            [3] => 1233
>        )
> 
> )
> 
> The vCard spec is impenetrable to my puny mind,

RFCs tend to be like that.  I've had to read through vCard and iCalendar
specs *several* times (still rereading them) in order to extract meaning
properly.

> but I'm guessing it
> allows for only a single value per type.

Sort of depends what you mean, and depends on the property.

If a property does not specifically say there can only be one (e.g. FN or
N), then there can be multiple.


> In the spirit of being
> liberal in what we receieve, I can't help but worry that
> concatinating the values might destroy useful, although flagrantly
> marked-up data. After all, each value in the test is valid input for
> a telephone number.

No, that's not how you would markup multiple telephone numbers.


> Am I worrying too much? Should I just splat an multiple 'value'
> values into one string and be done with it?

Yes.

And make sure you can handle:

<span class="tel">14155551212</span>
<span class="tel">14085551212</span>

that's how you publish multiple phone numbers.

Thanks,

Tantek



More information about the microformats-dev mailing list