[whatwg] Where did the "rev" attribute go?
Ian Hickson
ian at hixie.ch
Tue Aug 7 21:15:31 PDT 2007
This e-mail consists of replies to a few e-mails on the subject of links
and link relationship types. No changes were made to the spec in response
to these e-mails; if you reply, please indicate if you think something
needs to change in the spec. Thanks!
On Sat, 8 Jul 2006, Charles Iliya Krempeaux wrote:
>
> But, if the intent [of removing 'rev'] to really get rid of confusion
> then.... There's actually 2 things I noticed confuse people.
>
> #1: That the label you pick for the "rel" (or "rev") needs to be a noun.
> (I do understand why... at least I think I do... so that you can use the
> same label in the "class" attribute. But it makes things difficult for
> some people.)
As others noted, the label you should pick for "rel" should be taken from
a specific set of labels defined in a specification (either HTML4, or
HTML5, or a Microformat spec, or some other extension specification). So
the "noun" aspect isn't a source of confusion as far as I can tell. It may
be that people don't know you shouldn't just arbitrarily make up now
names, though.
> #2: That "rel" (and "rev") represent a relation between the two. Often
> people seem to want to "classify" what's at the end of the "href".
> (Instead of specifying a relation.) Perhaps a new attribute is needed.
> Perhaps "hrefclass".
"class" on an <a> element can be used for this, IMHO.
On Tue, 11 Jul 2006, Charles Iliya Krempeaux wrote:
>
> Let's say in a page, I have the following HTML code...
>
> <li class="xoxo shows">
> <li><a rel="show" href="http://show.example.com/">Example IPTV
> Show</a></li>
> <li><a rel="show" href="http://show2.example.com/">Another Example IPTV
> Show</a></li>
> </li>
>
> The semantics here are.... The class-xoxo (on the <li>) says that I'm
> giving a list here.
I assume you meant to use an <ol> on the outside, not an <li>. And in that
case, it's the <ol> that says that you're giving a list, the xoxo class
isn't necesarry to give the "list" semantic.
> And the class-shows says this thing is/has "shows". (So basically, I'm
> listing shows.)
This isn't a strong semantic (a random person who doesn't know you
wouldn't necessarily know that's what your class meant), but it can be a
convention you use within a particular community, sure.
> The rel-show inside the "list of shows", says what's at the end of the
> "href" is a "show" for the list of "shows".
You could easily use "class" on the <a> element for this, without risking
a clash with a future value introduced in (say) HTML6 for slideshow links.
It would be as solid, semantically.
If you wanted to go further, you'd have to define a specification for your
rel or class "show" value. Your specification could then include the rest
of your description:
> So,... if you go to the URL in the "href", you get a whole HTML page
> with all sort of stuff in there. But what is the "show"? The whole
> page? Just part of it?
>
> Well, I then search the page for class-show. (I look for something
> inside the page with a class with the same token/name use in the "rel"
> that linked there.)
>
> If I find (just) one, then great, that's probably what I want to
> concentrate on. (The other parts of the page are probably irrelevent.)
> If not, I'll probably have to concentrate on the whole page.
>
> (This is the idea of opaque semantics that I was talking about before.)
>
> Does that clear it up?
>
> (This is what I imagined the developers of these things originally
> thought up.)
> I suggested "hrefclass" because we already have things like... "lang"
> and "hreflang". It just seemed to follow the same style. (Since this
> seems to be just like the "class" attribute, expect we are applying it
> to what is at the end of the "href"... so "hrefclass".)
I don't really understand why you can't just apply it to the link itself
(i.e. use "class").
On Tue, 11 Jul 2006, Charles Iliya Krempeaux wrote:
>
> Perhaps it's a poor example. But what I've gotten from the specs is
> that the "rel" attribute can be used in this way.
Could you check the HTML5 spec and let me know if it can still be
interpreted this way?
> For an example that's gained some popularity, look at hCard.
> http://microformats.org/wiki/hcard
>
> People wanted to semantically denote "contact info". So they choose a
> set of class names to use (to do this) and some rules about them.
>
> Creating the standard is a somewhat arbitrury process. And requires
> humans to do it.
>
> Although with opaque semantics, like the "rel" name matching the "class"
> name, you don't need a human intervention to parse much of it.
>
> Does what I'm saying make sense? Or should I explain it more?
I'm not convinced there's really a use case for making this automated to
the level that you describe. It seems best to stick to having
specifications for the cases that actually have uses.
> Alot of this is done for the benefit of machines (like browsers,
> spiders, search engines, etc).
Right now, everything is done for the benefit of humans. The machines are
just tools.
> But getting back to one things you said... it is NOT always the case
> that you can "grab" something with an "id". Sometimes using "class"
> works better.
>
> For example, consider if I wrote an article. And, in the HTML for that
> article, I mark certain parts of it as being part of a "summary" for it.
> For example....
>
> <p>
> <span class="summary">Blah blah blah. Blah blah blah blah. Blah blah
> blah blah.</span> Blah blah.
> </p>
> <p>
> Blah blah blah blah blah. Blah blah blah blah. Blah blah blah blah.
> Blah blah. <span class="summary">Blah blah blah.</span>
> </p>
> <p>
> Blah blah blah. Blah blah blah blah. Blah blah blah blah. Blah blah.
> </p>
>
> How would I grab that with an "id".
>
> The class-summary's in there let me get at the summary that spread out
> in multiple fragments.
What if the class isn't there? Why is the class different than the ID?
> Just one other example for good measure. Consider this code...
>
> <p>
> I am <a href="http://changelog.ca/">Charles Iliya Krempeaux</a>.
> </p>
>
> As a human you can understand what that means. You know it is a
> statement. You know "Charles Iliya Krempeaux" is a name. You know that
> " http://changelog.ca/" is the site for "Charles Iliya Krempeaux".
>
> But a machines does not know that. It cannot figure that out.
>
> That's where some "semantic salt" can be helpful. hCard's let us add a
> little semantics to make it so machines can figure out the "name" part
> of it too.
>
> So, if I were add an hCard I'd get...
>
> <p>
> I am <a class="vcard fn url" href="http://changelog.ca/">Charles Iliya
> Krempeaux</a>.
> </p>
>
> (The class-vcard, class-fn, and class-url are all part of hCard.)
>
> With just that, machines now know that "Charles Iliya Krempeaux" is a
> name. And "http://changelog.ca" is the site for "Charles Iliya
> Krempeaux".
>
> I could even add more semantics....
>
> <p>
> I am <a class="vcard fn url" href="http://changelog.ca/"><span
> class="given-name">Charles</span> <span class="additional-name">Iliya</span>
> <span class="family-name">Krempeaux</span></a>.
> </p>
>
> Now, not only does it know that "Charles Iliya Krempeaux" is a name.
> But it also knows that "Charles" is the person's "given name". That
> "Iliya" is that person's "additional name". And that "Krempeaux" is
> that person's "family name".
>
> (If you are coming from an XML point-of-view. Using the class names for
> semantics is almost like entangling XML within HTML. If that makes
> sense.)
With you so far... But so what? As you say, this all works. Why do we need
a generic mechanism? The only reason the computer "knows" that Krempeaux
is your family name is because someone wrote a spec for class=family-name.
It's not automatic, how can it be?
--
Ian Hickson U+1047E )\._.,--....,'``. fL
http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,.
Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
More information about the whatwg
mailing list