[uf-dev] Re: [uf-discuss] Use title attribute in non-abbr tags?

Tantek Ç elik tantek at cs.stanford.edu
Sun Dec 4 11:10:00 PST 2005


Side note: parsing discussions are typically more appropriate for the dev
list rather than the discuss list, redirecting discussion accordingly.


On 12/4/05 10:41 AM, "Scott Reynen" <scott at randomchaos.com> wrote:

> I looked around on the wiki, and read Tantek's original explanation
> of using title in abbr tags [1],
> [1] http://tantek.com/log/2005/01.html#d26t0100
> but I didn't find a clear answer to
> this.  Should title attribute values be preferred to internal text
> values in non-abbr tags when parsing microformats?

In general no.  We want to prefer the *visible* content over the
less-visible (title attribute) content. abbr is an exception, and even
should only be used when a more human-readable value is required in contrast
to a machine readable value.

For specifics, see the hCard parsing page, which has captured a lot of the
"general" approaches to parsing HTML for microformats.

 http://microformats.org/wiki/hcard-parsing

Once I finish writing the equivalent hcalendar-parsing, I'll take the
portions in common and move them to a more general "parsing" page.  Until
then, I'm solving the specific cases first, as that is a better way to
arrive at optimal (least wasteful) general rules, rather than figuring out
the general case first.


> E.g. if a parser 
> comes across something like <span title="Bob Smith" class="fn">Robert
> Smith</span>, should it take "Bob Smith", or "Robert Smith" as the
> value of the fn,

Robert Smith


> or should that only be done if the tag is abbr?

In general yes, but again, see the hcard-parsing page for details.

Thanks,

Tantek



More information about the microformats-dev mailing list