Home

Advertisement

Previous Entry | Next Entry

hCard specification confusion

  • Aug. 8th, 2007 at 12:02 PM
Hellhound head

Anyone any good with hCard microformats?

I've been adding info to my blog for fun, but I'm running into issues (when testing exporting it as a contact file through Operator and opening with Outlook): in a couple of cases it is incorrectly getting its data from the tag contents instead of the title attribute. (I'm using titles simply to make the human-readable part flow a bit more nicely.)

Code:


<address class="vcard">Contents &copy; <a class="url" href="http://hellhound.net/"><abbr class="fn" title="Herm Baskerville">Herm</abbr> '<span class="nickname">Mutt</span>' Baskerville</a></span>. <span class="org">Mutt <span class="title role" title="admin">administrates</span> <a class="organization-name" href="http://profusion.hellhound.net/" title="Profusion">Profusion writing and roleplay</a></span>.</address>


produces (edit: following code removed while I test stuff):



It's correctly picking up Herm1 Baskerville as the full name. (The abbreviation tag with title is apparently best practice, better than classing separate words [plus a space] as name-parts, and clearly it does make more semantic sense.)

It is incorrectly picking up "Profusion writing and roleplay" for the organisation (instead of "Profusion") and "administrates" (instead of "admin") for the position.

Now, the title attribute is meant to overrule tag contents, unless I misunderstood something; perhaps it doesn't count in these specific cases? And no I'm not sure I really want to include all this info on the page, but I'm trying things out, godsdammit. :)

edit: Responses and interesting stuff to be found on the LJ mirror of this entry

1 Less confusing than "Herman or Hermia, depending on my mood", right?

View the original post at HellHound.net

Comments

[info]kevinmarks.com wrote:
Aug. 9th, 2007 10:41 am (UTC)
Try this way:
Contents © Herm 'Mutt' Baskerville (http://hellhound.net/). Mutt administrates Profusion writing and roleplay (http://profusion.hellhound.net/).
[info]kevinmarks.com wrote:
Aug. 9th, 2007 10:44 am (UTC)
Re: Try this way:
hm, some rewriting went on there, lets try escaping it:

<address class="vcard">Contents © <a class="url n" href="http://hellhound.net/"><span class="given-name">Herm</span> '<span class="nickname">Mutt</span>' <span class="family-name">Baskerville</span></a>. <span class="org">Mutt <span class="title role">admin</span>istrates <a href="http://profusion.hellhound.net/"><span class="organization-name">Profusion</span> writing and roleplay</a></span>.</address>

[info]hellmutt wrote:
Aug. 9th, 2007 11:19 am (UTC)
Ah, yes, looks more logical. Thanks!

One question, though - we don't declare a "fn" there, and isn't that required?
(Anonymous) wrote:
Aug. 9th, 2007 11:18 am (UTC)
The title attribute is only taken from "abbr" elements. But note concerns about the accessibility of this technique when used for machine-readable dates, coordinates, etc. http://www.accessifyforum.com/viewtopic.php?t=8788

--
Andy Mabbett
[info]hellmutt wrote:
Aug. 9th, 2007 11:23 am (UTC)
Good to know. Thanks. It did seem a slightly peculiar technique.