[uf-dev] implied-n: what's in a name?
Tantek Ç elik
tantek at cs.stanford.edu
Mon Jun 26 10:26:40 PDT 2006
On 6/26/06 9:53 AM, "Drew McLellan" <lists at allinthehead.com> wrote:
> 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.
Then that's an excellent candidate for an FAQ.
>>> 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.
Yes.
>>> 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.
Thanks! Even if you just copy/past questions/answers from this email
thread, that would be great. We can always do wiki cleanup later. The
important part is to capture it.
Thanks,
Tantek
More information about the microformats-dev
mailing list