[whatwg] rel/rev for <form> ?

On Fri, 4 Nov 2005, Charles Iliya Krempeaux wrote:
> The "rel" and "rev" attribute are very useful for adding semantics to 
> both the anchor element -- <a> -- and the link element -- <link>.
> I'd like to suggest that form element -- <form> -- get both "rel" and 
> "rev" attributes.

An interesting idea, but in general we need to find problems before 
finding solutions! :-)

On Fri, 4 Nov 2005, ROBO Design wrote:
> Interesting suggestion. I can't help but wonder what exactly would this 
> change to the "user experience". Rel for LINK and A is changing the user 
> experience in user agents, because they can provide a "fixed" set of 
> keyboard shortcuts (mouse gestures or whatever) for going to the 
> previous/next page, help, home, author, etc.
> What are your ideas about this? What would you like user agents to do 
> based on various <form> rel= attributes?

Good questions.

On Fri, 4 Nov 2005, Charles Iliya Krempeaux wrote:
> There's a number of different "use cases" that this would be very useful 
> for.  I'll try an list some of the ones I think are important.

In general the mapping should be the other way around -- for each problem, 
list possible solutions. Having a solution in search of problems is 
putting the cart before the horse, as they say. :-)

> In writing "user scripts" and "extensions" it is often desirable to look 
> for "semantics" in a page.  For example, consider the semantics given by 
> rel-license <http://microformats.org/wiki/rel-license>. rel-license 
> provides a way of specifying a license for either the whole "document" 
> or part of the "document" it is in.  (It's usually used in the <a> 
> element.)
> There is a Mozilla Firefox extension called MozCC 
> <https://addons.mozilla.org/extensions/moreinfo.php?id=363> which will 
> look for rel-license in a page, and if the URL in the "href" of the 
> rel-license <a> element points to a CreativeCommons license, it then 
> displays "icons" that describe the license.
> Also, Mark Pilgrim has written a (greasemonkey) user script 
> <http://diveintomark.org/projects/greasemonkey/rellicense/> that can 
> detect and "handle" a very large number of licenses.
> Further, web crawlers (and search engines) can make use of this license 
> information.  (For example, Yahoo! has a way of searching only within 
> stuff that are licensed under a CreativeCommons license -- 
> http://search.yahoo.com/cc )
> Also, one could even consider the semantics given by XFN 
> <http://gmpg.org/xfn/>.  (It is rel-based format on the <a> element.) Or 
> any of the other many "rel" and "rev" based formats on the <a> and 
> <link> elements.  (I can list more if you want to hear them.)
> (So hopefully I've shown that "rel" and "rev" based formats can be 
> useful beyond just making "keyboard shortcuts" in the user agent.)

Indeed, for links...

> One of the restriction with <a> and <link> based "rel" and "rev"
> formats is that you implicitly require the HTTP resource (in the
> "href" of the <a> or <link>) element, to be accessed via an HTTP GET. 
> With a <form> element, you are not restricted by this.  With the
> <form> element you can use other HTTP methods (by specifying the
> method you want to use in the "method" attribute of the <form>
> element).  For example:
>     <form method="POST" href="/me.php" rel="api.comment.add">
>         <textarea name="comment"></textarea>
>         <input type="submit" value="Add Comment" />
>     </form>
> Also, another restriction with <a> and <link> based "rel" and "rev" 
> formats is that you have no way of "parametrizing" things.  But with a 
> <form> element you can.  (As shown with the example above too.)

That's a theoretical possible use case... does anyone actually want to do 
this? We should, I feel, concentrate on real problems before adding hooks 
for ideas (especially in this case, where one could use the 'class' 
attribute if one needed to do this).

> Those who have been touting using HTTP how it was designed to be used... 
> although their calling it REST for some reasons... would likely find 
> this type of thing useful too.

If they ask for it, we'll see. :-)

> Also, those that are trying to add increased semantics to HTML under the 
> Micformats banner -- http://microformats.org/ -- would also find this 
> useful.

They mostly seem to be using the 'class' attribute, which here would work 
fine, as far as I can tell.

> This could be used for user agents, for user scripts, for extensions, 
> and for web crawlers.  (There's probably more creative uses for it too.)

It's not clear to me how it could be used usefully.

On Sun, 6 Nov 2005, ROBO Design wrote:
> On Sun, 06 Nov 2005 04:41:58 +0200, Mike Dierken <mdierken at hotmail.com> wrote:
> <...>
> > I actually would find it interesting and useful for a the inputs of a 
> > form to have a 'class' attribute that indicates the meaning of the 
> > parameter - and let a web crawler find all the forms that use a 
> > certain class of input parameters.
> > 
> > For example:
> >  <form action="citizens.cgi" method='GET'>
> >   <input name='the-ssn' class='gov.us/identity/individual-tax-id'
> > type='text' />
> >  </form>
> > 
> >  <form action="houses-for-sale.cgi" method='GET'>
> >   <input name='zip' class='gov.us/postal/zip-code' type='text' />
> >  </form>
> > 
> > It would be cool to have a service that discovered these forms and 
> > then provided a search of all the URIs that accepted 
> > social-security-number, or zip-code.

RFC3106, which WF2 mentions, provides a way to do this.

Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Wednesday, 31 October 2007 18:12:49 UTC