W3C home > Mailing lists > Public > www-html@w3.org > September 2002

Comments on HLink

From: Bill Daly <billdalynj@yahoo.com>
Date: Thu, 26 Sep 2002 13:38:01 -0700 (PDT)
Message-ID: <20020926203801.9426.qmail@web40503.mail.yahoo.com>
To: www-html@w3.org

This is a thought that occurred to me while reading
through the HLink vs XLink discussion currently
ongoing on www-tag.  Since it's an issue with HLink
and has nothing to do with that debate, I'm posting it
to this list since it seems it would be more on-topic
here than there.

Let's say I was currently looking to have a resource
load in a new window when it's clicked, and all these
links also have the class "external" associated with
them for some CSS styling.  Right now, I'd use code
like:

<a class="external" href="http://www.w3.org"
onclick="window.open('http://www.w3.org')">W3 Site</a>

XLink, although I'm not completely familiar with its
syntax, I believe would have the above link looking
something like the following:

<a class="external" xlink:href="http://www.w3.org"
xlink:show="new">W3 site</a>

A little better, a little worse, depending on how you
look at it.

As far as I can see from the Hlink Draft, it would
still be done the first way in HLink, as there would
be no real way of associating an hlink with only that
particular <a> element in the document, only the <a>
element in general.

The power of HLink would, in my opinion, be greatly
expanded by two new attributes, "class" and "idref"
(better name than idref perhaps?).  Then in a document
with many external links, an hlink element in the head
could be used to make all <a> elements with
class="external" open in a new window.  Something
like:

<hlink:hlink namespace="http://www.w3.org/1999/xhtml"
       element="a"
       class="external"
       locator="@href"
       effect="new"
       actuate="onRequest" />

Then all <a class="external"> in the document would
have the desired behavior without having to add any
"onclick" or "xlink:show" to the actual element
itself.

I see this as an addition that would be beneficial to
web developers as they would be able to define the
behavior for an entire class of links in one fell
swoop.  Otherwise, if HLink is to only apply to an
element in general, I just don't see much use that
would be gotten out of it.

Bill Daly

__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com
Received on Thursday, 26 September 2002 16:38:32 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:15:52 GMT