[whatwg] hrefclass attribute ? -- semantics token reuse
robodesign at gmail.com
Sun Nov 27 12:01:11 PST 2005
On Sun, 27 Nov 2005 00:28:49 +0200, Charles Iliya Krempeaux
<supercanadian at gmail.com> wrote:
> This is kind of a follow up to a previous post of mine:
> rel/rev for <form> ?
> Now, although I still think "rel" and "rev" attributes on the <form>
> element would be useful, I did note (to myself) that in some cases
> "rel" and "rev" were not what I really wanted. "rel" and "rev"
> specify semantics between (all or part of) the document they are in
> and the resource the "href" (or "action") attribute points to. (At
> least that's my understanding of it.)
Best description of rel and rev attributes I ever read is:
> For purposes of (semantic) token reuse, it would be nice if there was
> something like an "hrefclass" attribute. For example, let's say we
> <ul class="shows">
> Now, lets say that instead of including this in our document, that we
> wanted to defer this to somewhere else. Then having something like
> the following would be very useful.
> <a hrefclass="shows" href="http://example.com/shows">...</a>
> Now, it's true that with the "class" attribute by itself we could do
> something like:
> <a class="href-shows" href="http://example.com/contact"></a>
> <a class="refersto-shows" href="http://example.com/contact"></a>
Shouldn't these last two links have href="http://example.com/shows", like
the first one? Is it a mistake or is it on purpose?
> But we don't have semantics token reuse in these cases.
> With semantics token reuse one could imagine something like "generic"
> parsers and web crawlers finding information when the things are
> spread out across multiple documents. Since the same "semantic token"
> is used in each case. All they'd need to do is "connect" things with
> the same name. (Without having to know anything about the "meaning"
> of the semantic tokens.) (Not to mention that it makes for better
> developer usability.)
My take on this: use rel and rev, no need for hrefclass. Almost each time
when an author wants to define the semantics of a resource, it's *almost*
always in relation to the current document (rel or rev, of course). The
way I see it, hrefclass would be useful only if it's defined in a "neutral
manner", as in: the resource identified by the link can be taken entirely
out of context and the semantics defined by hrefclass can also be taken
out of context too, without any relation to the initial document.
Yet, the first thing I did think of ... is "too much semantics", overload
(sounds weird?). Why? We got class, rel, rev and even ID. Some would be
inclined to say there's no "too much semantics", but I believe there's
"too much" of *anything*, including, but not limited to, semantics.
Currently, even if mini-specs for microformats are being written, there's
still no wide usage of real semantics in documents.
That's my opinion. I'm not sure if it's something others agree with.
ROBO Design - We bring you the future
More information about the whatwg