Re: Hlink, CSS anyone?

Eric,

> I think that the option to use CSS to express HLinks as proposed by
> Micah Dubinko [1] and Uche Ogbuji [2] needs to be seriously explored
> if not already done.

I agree that CSS has a lot to offer:

  - you're probably going to be using CSS to style your document
    anyway
    
  - there's an existing mechanism to link a document to a CSS
    stylesheet

  - the selectors give you great flexibility in terms of assigning
    linking semantics to all elements with the same name, or based on
    their attribute values, down to the level of individual elements
    by ID

I'm just a bit worried that a syntax like:

> The proposal done by Micah:
>
> img {
>   link-define: {
>     link-locator: attr(src);
>     link-effect: embed;
>     link-actuate: onLoad;
>     link-onFailure: warn;
>   }
>   link-define: {
>     link-locator: attr(longdesc);
>     link-effect: new;
>     link-actuate: onRequestSecondary;
>   }
>   link-define: {
>     link-locator: attr(usemap);
>     link-effect: map;
>     link-actuate: onLoad;
>   }
> }

means extending CSS not only by adding a few properties (which is easy
enough) but by extending the syntax so that the value:

  {
    link-locator: attr(src);
    link-effect: embed;
    link-actuate: onLoad;
    link-onFailure: warn;
  }

becomes legal.

I wonder whether something more like:

  img {
    display: link;
    link: embed url(attr(src)) onLoad warn,
          new url(attr(longdesc)) onRequestSecondary,
          map url(attr(usemap)) onLoad;
  }

would work? I've often thought that display: link would be useful in
order to enable me to use the :hover etc. pseudo-class on arbitrary
elements.
  
Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/

Received on Saturday, 28 September 2002 05:27:44 UTC