[uf-dev] implied-n: what's in a name?

Drew McLellan lists at allinthehead.com
Mon Jun 26 09:53:33 PDT 2006


On 26 Jun 2006, at 17:23, Tantek Çelik wrote:

> On 6/26/06 8:48 AM, "Drew McLellan" <lists at allinthehead.com> wrote:
>
>> The first implied-n optimisation rule states:
>>
>>> The content of "FN" is broken into two "words" separated by
>> whitespace.
>>
>> My question is - what's a word? Obviously whitespace delimits a word,
>> but is any non-whitespace value permitted? How about punctuation and
>> numbers?
>
> No.  Just whitespace.  This is explicit in the spec:
>
> http://microformats.org/wiki/hcard#Implied_.22n.22_Optimization
>
>  two words (separated by whitespace)
>
>  two "words" separated by whitespace
>
>
> If you see any wording that is ambiguous in the spec, please let me  
> know!

I guess the point I was unclear on was which characters were legal  
for a "word". That said, I can't think of an alternative phrasing  
that seems clearer than the spec is currently.


>> An example I just ran across is fn="Sarah-Jane Smith". Am I safe to
>> imply n from that?
>
> Yes.  This is precisely why I defined "two words" as separated by  
> whitespace
> in the spec.  Many names have punctuation in the middle, and rarely  
> (if
> ever?) does that punctuation serve to split/delimit the name into  
> several
> names.  When it does, the explicit "given-name" "additional-name"  
> markup
> MUST be used.

So in terms of a regular expression, a "word" can be matched by /\S+/  
a non-whitespace character, one or more times.


>> So many questions! :)
>
> Keep asking!
>
> Drew, perhaps this question about "N", whitespace and punctuation  
> in names
> is deserving of adding to the hCard FAQ?
>
>  http://microformats.org/wiki/hcard-faq

I'll endeavour to write something up for that page.

drew.


More information about the microformats-dev mailing list