[uf-discuss] GRDDL with HTML 4.01

Tom Morris tom at tommorris.org
Tue Oct 2 05:57:11 PDT 2007

Sorry, I've been procrastinating and avoiding my e-mail.

On 9/27/07, Andy Mabbett <andy at pigsonthewing.org.uk> wrote:
> In message
> <d375f00f0709271508v5c2101aay3abe9fe8a829da7a at mail.gmail.com>, Tom
> Morris <bbtommorris at gmail.com> writes
> Am I correct in thinking you'd parse any page with hCard that way, with
> or without it having GRDDL mark-up?

Yes, Triplr should parse most pages with hCard (and whatever the other
common microformats it has built in) without any profile URIs. Next
time I see dajobe on IRC, I'll ask him which microformats it

> >Triplr can't parse any of the actual GRDDL data.
> Not sure what you mean, here.

Triplr is not reading the data-view URI from your page (it's not
expecting it to be there) and thus not making the correct inferences.

> > You ought to use a
> >profile page - perhaps a specific profile for your whole site with
> >links to different transformations.
> What would be the advantage of that, for me or the site's users?

Well, making one of your pages in to a profile for all the others
won't really help you, nor the sites users. But until we get off our
collective arses and put up profiles for the other microformats and
non-official-microformats (GeoURL in this case).

> >Using data-view on the source document is not good practice. There's
> >no reason you can't but Triplr doesn't seem to be reading it.
> Again, not sure what you mean, here.

Okay, your page has got the <http://www.w3.org/2003/g/data-view>
profile URI. Technically, a GRDDL processor ought to pick that up and
use it to interpret the contents of your page in accordance with what
is in the link[@rel='transformation'] elements. But - in practice -
that's not how it's implemented. You should really have a separate
profile URI. Most GRDDL processors aren't written to recognise the
link[@rel='transformation'] elements on the 'source' page, but on the
'profile' page.

If you switched your page over so that it used links to profile URIs,
rather than using the page itself as a profile for how to intepret the
page, there are other advantages - GRDDL processors can often be
optimised by locally storing the relevant transformations. In my
internal processor, for instance, I have a local copy of the hCard
transformation - it's invoked both by the string "vcard" being in the
document and the hCard profile URI: <http://www.w3.org/2006/03/hcard>.

Unfortunately, you are in the position where the profile URIs don't
exist at the moment. That's why I'm suggesting you simply have a
profile page on your site - a bit like mine:
It would simply contain a list of all the XSL files you currently have
in head/link.

You could edit <http://www.westmidlandbirdclub.com/site/> this page to
turn it in to a GRDDL profile for the site, then just point to it from
the profile URIs. "About this Site" and "Colophon" style pages seem
like an ideal candidate for being GRDDL profiles.

> >The W3C hosts an official reference implementation GRDDL service:
> >http://www.w3.org/2007/08/grddl/
> >This should not read your page as it's designed to work closely to
> >spec - i.e. XHTML and XML, not HTML 4.
> That seems a rather short-sighted view, if the intention is to allow
> publishers to join the semantic web with the least effort.

It's not really short sighted. The W3C implementation is a reference
implementation that's built as closely as possible to the spec. Most
GRDDL implementations will not follow the spec, and will extend it to
do things like (a) automatically detecting microformats and (b)
supporting HTML 4. It's not really intended for public use, but just
to see what the page should look like to a 'base' GRDDL

If you have specific implementation things you wish to discuss, feel
free to e-mail or IM me off-list.

Tom Morris

More information about the microformats-discuss mailing list